Files
jansson/src
Tobias Stoeckmann 38b001edbd Handle vsnprintf corner cases.
The function vsnprintf returns a negative value on error, e.g. on
an invalid format. It's best to return NULL in such a case.

Also avoid a signed integer overflow if vsnprintf returns INT_MAX.
This is undefined behaviour in C and has to be avoided.

A negative value is returned with a call like:
json_sprintf("%111111111111111s", "", "");

INT_MAX is returned with a call like:
json_sprintf("%647s%2147483000s", "", "");
2020-05-23 12:34:40 +02:00
..
2019-10-21 08:56:03 +03:00
2019-10-21 08:56:03 +03:00
2019-10-11 11:20:25 +08:00
2020-05-07 21:38:59 +03:00
2019-10-21 08:56:03 +03:00
2019-10-21 08:55:01 +03:00
2020-05-07 21:38:59 +03:00
2019-10-21 08:55:01 +03:00
2019-10-21 08:55:01 +03:00
2019-10-21 08:56:03 +03:00
2019-10-21 08:55:01 +03:00
2020-05-23 12:34:40 +02:00
2019-10-21 08:55:01 +03:00