"Dimitrie O. Paun" dpaun@rogers.com writes:
Yes, I thought it would be related to buffer sizes, but it does not look like the right fix. We should check, and not exceed, the size of the buffer, not limit the input to the worse case safe minimum. I'll look at an alternative fix.
The problem is not the string buffer itself, it's the output buffer. You can't really know what limit to use for that because you don't know what else the caller is printing at the same time. Anyway 80 chars should be more than enough to figure out what the string is about.