It's probably dental disease though bad or smelly breath can be a symptom of something like liver or kidney problems or diabetes (usually a bit sweet like happens with us but not always). You should have your vet check out your pup since bad teeth can cause infection, abscess, even cause heart, liver or kidney problems or bad breath can indicate an underlying health concern other than those originating in the mouth. Hope your pups okay.
That would be stomach cancer. Bleeding from the esophagus into the stomach can produce a bad smell and the vomiting of what looks like fresh coffee grounds but is actually blood tht has been in contact with stomach acid.