He gave him a bag of rice; can he give zakat al-fitr from it?
Question

Someone gave me a big bag of rice, which is more than I need. Is it permissible for me to give zakat al-fitr from it on behalf of myself and my family? Please note that I can afford to buy something from my own wealth.
Praise be to Allah.There is nothing wrong with you giving zakat al-fitr on behalf of yourself and your family from that bag of rice which you received as a gift, because the gift becomes the property of the one to whom it was given, which he may dispose of however he wishes, whether that is selling it, giving it away, giving it in charity and the like. This has been explained previously in the answer to question no. 70272. 
Indeed the scholars (may Allah have mercy on them) stated that if a poor person accumulates from the zakaah of the rich more than he and his dependents need, he may give zakat al-fitr from that zakaah that came to him. 
Shaykh Ibn Baaz (may Allah have mercy on him) was asked: If a poor person receives zakaah al-fitr from people, can he give his own zakaah al-fitr from that which was given to him, or is that not permissible? 
Answer: 
Yes, he may do that, if what he was given came to him before Eid, he (may give his zakat al-fitr from it). But if what he was given does not come to him until after Eid, he does not have to do anything, if he is poor and does not have anything on the night before Eid; that is, if he does not have a saa‘ to give on his own behalf or more than that to give on behalf of himself and the members of his household, because of the severity of his poverty. Then in that case he does not have to do anything, but if he is well off enough to be able to give a saa‘ on his own behalf and other saa‘s on behalf of the members of his household, he should keep enough to meet his own needs on the day of Eid and the night of Eid, and give zakat al-fitr from the remainder on behalf of himself and of the members of his household.
End quote from Fataawa Noor ‘ala ad-Darb by Ibn Baaz (15/291) 
And Allah knows best.