Is a starving person justified in stealing food? In Germany it is not illegal to steal food when  you're about to starve. Would someone who does this still would have to face negative consequences because of  this stealing in the future?
In general, in Buddhism taking without asking would still be considered unskilful. The relevant precept is adinnādānā veramaṇī sikkhāpadaṃ samādiyāmi "I undertake the training principle of not taking the not given". There is nothing to stop someone asking for food if they are hungry. Indeed by stealing one also deprives the other of the opportunity of gaining the merit of generosity.