json: Minor cleanups in cJSON.c
json: Minor cleanups in cJSON.c

* src/cJSON.c: Add comments on the origin of the code.
(parse_string): Allocate an extra byte for safeness.
(cJSON_AddItemToArray): Allo ARRAY to be NULL.

Signed-off-by: Werner Koch <13bd1fc5137f503b0a8355ad400e7a87ebb45b25@gnupg.org>

gpg/gpgme,gpg/gpgme,gpg/gpgme,gpg/gpgme,gpg/gpgme,gpg/gpgme,gpg/gpgme