Researches did not read the C spec.
> sprintf(buf, "%f", 1E300) will generate a massive string.
Actually, it wont! The standard says that if precision omitted in %f, like it is here, it is assumed to be 6.
So the 20-character array allocated is actually overkill.