From the CDC:
Protect yourself from botulism: When in doubt, throw it out!
Any food that may be contaminated with botulinum toxin should be thrown out. See Safely dispose of food and cans that may be contaminated below.
Never taste the product to determine if it is safe. Do not taste or eat foods from containers that are leaking, have bulges or are swollen, look damaged or cracked, or seem abnormal in appearance.
When you open a jar of commercially or home-canned food, thoroughly inspect the product. Do not taste or eat foods that are discolored, moldy, or smell bad. Do not use products that spurt liquid or foam when the container is opened.
Inspect your commercial and home-canned foods
Don't open or puncture any unopened cans, commercial or home-canned, if you suspect contamination.
Suspect contamination if
The container is leaking, bulging or swollen, looks damaged or cracked or seems abnormal in appearance
The container spurts liquid or foam when opened
The food is discolored, moldy, or smells bad