Avoid cans that are badly dented, bulging, or have a bad smell. For the same reason, you should also avoid jarred foods with cracks in the glass or loose lids.
You should avoid any suspected spoiled canned goods for fear of botulism. The botulism toxin has the potential to be fatal and can also spread through skin contact.
Alternatively, you can use soda can boxes for quick and easy storage. While this storage hack may not work for jars, it should be easy to fit canned goods inside.