json-maker icon indicating copy to clipboard operation
json-maker copied to clipboard

Protection against buffer overrun

Open jeremyherbert opened this issue 6 years ago • 0 comments

Hi,

Thanks for publishing this library! I have just been looking at using it in an embedded project, but it seems that when constructing json objects, it is possible to overrun the string buffer without knowing. Perhaps it is worth adding an argument (or a series of “_s” suffixed methods) which take an additional length parameter and checks that the length of the string does not increase beyond the allocated buffer length ?

jeremyherbert avatar Jun 16 '19 10:06 jeremyherbert