It is narrated from Sayyiduna Abdullah bin Amr (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "The hand is not cut off for (stealing) fruit as long as it is on the tree, until it has been brought into the houses and stored, nor for (stealing) grazing livestock until they have been brought into their pen (a secure place)." The chain of this hadith is hasan (good).