|
@@ -628,7 +628,7 @@ static const unsigned char *parse_string(cJSON * const item, const unsigned char
|
|
|
|
|
|
/* This is at most how much we need for the output */
|
|
/* This is at most how much we need for the output */
|
|
allocation_length = (size_t) (input_end - input) - skipped_bytes;
|
|
allocation_length = (size_t) (input_end - input) - skipped_bytes;
|
|
- output = (unsigned char*)hooks->allocate(allocation_length + sizeof('\0'));
|
|
|
|
|
|
+ output = (unsigned char*)hooks->allocate(allocation_length + sizeof(""));
|
|
if (output == NULL)
|
|
if (output == NULL)
|
|
{
|
|
{
|
|
goto fail; /* allocation failure */
|
|
goto fail; /* allocation failure */
|
|
@@ -1101,7 +1101,7 @@ static cJSON_bool print_value(const cJSON * const item, const size_t depth, cons
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
- raw_length = strlen(item->valuestring) + sizeof('\0');
|
|
|
|
|
|
+ raw_length = strlen(item->valuestring) + sizeof("");
|
|
output = ensure(output_buffer, raw_length, hooks);
|
|
output = ensure(output_buffer, raw_length, hooks);
|
|
if (output == NULL)
|
|
if (output == NULL)
|
|
{
|
|
{
|