To follow up on @LuckyGuy‘s generally good advice, if the wood has “pockets” of mold or dampness, then these could cause a generally unfavorable condition as the water trapped inside the solid wood expands rapidly to steam – in a hot stove or fireplace – and could “explode” the log. That is all dependent upon how much water there is, whether it has an avenue to “steam off” safely as it heats up, the temperature of the stove or fireplace, etc.
And the danger, if there is any, can also be mitigated by the stove design and whether all openings are properly covered so that the pressure from any rapid expansion will be vented through the flue, as it should be, and not onto the hearth or floor of the room.
That’s all a judgment call. The general advice holds: burn dry wood.