Trim string lengths to avoid crashes.

I still don't know how best to calculate AppSync/AppMessage buffer sizes...