Does this logical fallacy have a name? [duplicate]
Solution 1:
TV tropes calls it Hitler ate sugar. It also says it's called "The Association Fallacy".
Solution 2:
You might be looking for affirming the consequent.
People who would illegally sell weapons to foreign drug gangs would be more likely to purchase available weapons that the gangs preferred. That does not mean that everybody who purchased weapons that the drug gangs preferred intended to sell them illegally to the gangs.
However, it might add to a prosecution case if there was also other evidence, such as preparations to smuggle weapons across a national border.
Solution 3:
How about "tarred with the same brush"? It's a little awkward when applied to firearms, but I think it fits.
Solution 4:
I agree with your original hypothesis of guilt by association.