He has only forbidden to you dead animals,1 blood, the flesh of swine, and that which has been dedicated to other than Allāh. But whoever is forced [by necessity], neither desiring [it] nor transgressing [its limit] - then indeed, Allāh is Forgiving and Merciful.
Translation: Saheeh International (English)
1 Those not slaughtered or hunted expressly for food.
Allah has made unlawful for you to consume that which died without being slaughtered according to the sacred law, blood that spills forth from an animal at the time of slaughter, all parts of the pig, and what was slaughtered by a person as an offering to other than Allah. This prohibition applies at the time when a person has a choice.If someone is compelled to eat any of these forbidden types, and does so without desiring the forbidden thing itself and without going beyond the limit of what is necessary, then they have done no wrong. Allah is Forgiving and will forgive them for what they consume. He is Merciful in that He permitted that when it is necessary.