Some of the better phones and USB devices will block unauthorized access of data by default, like when your iPhone asks you to unlock it before performing a sync with your laptop. However, these protections aren't always foolproof and there have been known security flaws and other attempts to bypass them. For that reason I use a SyncStop when I must use a public charger.
Another neat trick for those traveling with laptops is to look for the USB post with the lightning bolt. This port should be active for charging even when the laptop is off. Depending on your laptop you may need to double check your BIOS settings to ensure it is on.