Some of the tastiest foods are meats that have been cured and smoked for long storage, such as ham, bacon or ham hocks. They're more durable than fresh meats -- sometimes startlingly so -- but they do eventually spoil like other foods. The smoking and curing process changes both the appearance and texture of the pork, so assessing whether a smoked ham hock is still usable is rather more complicated than it would be with a piece of fresh pork.
A Quick Primer
The ham hock is the very bottom part of a hog's leg, the tough and stringy portion cut from the shank end of a ham. They're usually cooked for a long time to make them tender, like lamb shanks or veal shanks. Most ham hocks, like the parent hams they're cut from, are cured in a wet brine. If they're still sealed in their original packaging, the best-before date on the package is a useful guide. Still, your eyes and nose are an indispensable second check. If the hock smells sour or fermented when you open it, or if it's oozing a sticky, slimy-feeling liquid, it should be discarded.
Some hocks are processed differently. They're hung and dried after curing, like a country-style American ham or the fabled European serrano and prosciutto hams. You'll usually find those in old-school butcher shops in ethnic neighborhoods. They're safe at room temperature or in your refrigerator, but your house doesn't offer the stable storage environment they had at the butcher's shop. Most will keep for 2 to 3 months in the refrigerator, but that time can be shortened dramatically by a humid location or any accidental exposure to moisture. If the hock develops black or green mold, smells fermented or weeps moisture, it should be discarded.