commit | d28434b4fa63997617624a25c3716e91332d3f37 | [log] [tgz] |
---|---|---|
author | Nicolas Pitre <npitre@baylibre.com> | Wed Jun 19 10:03:34 2019 -0400 |
committer | Anas Nashif <anas.nashif@intel.com> | Sun Jul 14 23:07:44 2019 -0400 |
tree | 0c8572dbbdc2ab12699aa72329a29e07bc9280ad | |
parent | 7c7f1078858011b98b880b24b5423df803ec574f [diff] |
prf.c: remove buffer limitation on precision and padding for floats Even if the code used to limit the precision to the on-stack buffer size, it was still possible to do: printf("%f", 1.0e300); which would overflow the stack and crash the program. Let fix this issue and remove the precision limitation by recording the number of zeroes to insert while converting the value and generating those zeroes only when outputting the data. Signed-off-by: Nicolas Pitre <npitre@baylibre.com>