SACRAMENTO, Calif. — Tampering with food could land a person up to 20 years in prison in Texas if they are caught putting it back on the shelf. How many years could it get you if you are caught tampering with food at the grocery store in California? 

The answer: Not as many.

This question was brought up after an unidentified woman went viral after a video showed her licking a half-gallon tub of Blue Bell's Tin Roof-flavored ice cream before she putting it back on the shelf at a Walmart.

California law (Penal Code Section 347) clearly states, any person who knowingly adds poison or a harmful substance to any food, drink, medicine, or pharmaceutical product where another person could be harmed, is guilty of a felony punishable by a prison sentence of two to five years.

The law also applies to harming a public supply of water, such as a well or reservoir. If the substance could cause death or great bodily injury to a person, an additional three years is added to the sentence.

RELATED: 

A person doesn't necessarily have to take action with food tampering to be in trouble. If a person maliciously reports food, medicine or water as being poisoned or tampered with, while knowing the report is false, they could face up to a year in jail or prison.

While the law states the report has to be malicious, even if it was a prank gone wrong the intention would need to be proven in court.

Also, a person doesn't necessarily have to add poison or chemicals to food for it to be considered a legal offense. Spitting in someone's food could be considered battery. Under California Penal Code 242, battery is defined as any willful and unlawful use of force or violence against another person. This applies to any indirect or direct physical contact.

Battery is a misdemeanor crime, punishable with up to six months in jail and a $2000 fine.

WATCH MORE: Urijah Faber explains UFC comeback ahead of Fight Night in Sacramento