What is the 7th commandment sin called that if you have food and a homeless hungry person comes by and wants it it is rightfully his and you withholding it could be a sin to you?
From the CCC:
You shall not steal.186
2401 The seventh commandment forbids unjustly taking or keeping the goods of one’s neighbor and wronging him in any way with respect to his goods. It commands justice and charity in the care of earthly goods and the fruits of men’s labor. For the sake of the common good, it requires respect for the universal destination of goods and respect for the right to private property. Christian life strives to order this world’s goods to God and to fraternal charity.
So yes, if you knowingly withhold food from a hungry person you are sinning. We should be as generous as our income and our own needs will allow us to be.