Yeah, definitely don't just stick something in, use protection. If you want to use an unknown public charge, there are USB data blocker adapters you can buy.
You get slow charging (since the devices can't negotiate), but it's better than an infection.