I'm not sure what version this was when it was first posted, however, following the wiki, we can identify exactly how fires are started.
Fire will spread over flammable surfaces. [...] This can happen at a distance of up to one block downwards, one block sideways (including diagonals), and four blocks upwards of the original fire block (not the block the fire is on/next to). Therefore if the player is using fire to build a fireplace, caution is needed. Blocks in the way will not prevent fire from igniting blocks above it—so even if you protect your wooden roof with cobblestone between it and the fire, the fire will completely ignore that cobblestone.
To test this, I built a little experiment:
As you can see, both of these are set up within the parameters of the reach of the spread. Needless to say: