Copy link
@setharnold

setharnold Feb 17, 2018

If newroot is 508 characters or more, the results of buf will not contain (some or all of) the .png contents. I always like to see the return value of snprintf() checked not just for less than zero (obvious failures) but also greater than the buf size, a kind of failure that may be every bit as catastrophic as a buffer overflow. None of these cases look that severe. But I'd like to encourage the habit of checking the error return value from snprintf(). Thanks.