This problem is nearly impossibly for the average Joe to detect because the flash drive looks and works normally- until it's memory is filled.
Here's how to protect yourself from this scam:
Step 1: How To Buy
(if you've already bought an unbranded flash drive online, skip to the next step)
1) Buy a brand name flash drive
-Most brands are reliable in terms of storage. Most unbranded drives aren't
2) Know your product
-I was naive enough to think that many companies (including unbranded ones) are producing 16GB flash drives- I could be wrong, but I believe the only company selling one of that size is Corsair. This goes for any size...
3) Look on the packaging
-If the buyer shows a picture of the packaging, see whether the storage is printed directly onto the packaging, or if there's a sticker on it that has it. If it's printed on, it's more likely not to be a scam as that means the company probably hasn't tampered with it
4) AVOID BUYING FROM EBAY!
-Ebay has been seemingly overrun by scam artists selling falsely listed items- avoid buying anything that's not a well-known brand name from Ebay at all costs!