Home GnuPG
Diffusion GPGME af2c74d6c06a

json: Don't use strdup but the xtrystrdup wrapper.

Description

json: Don't use strdup but the xtrystrdup wrapper.

* src/gpgme-json.c (create_keylist_patterns): Use CNT as first arg for
xcalloc.
(process_request): s/strdup/xtrystrdup/.

calloc takes two arguments so to be able to detect integer overflow.
Thus if we switch from malloc to calloc we should utilize that.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Jul 19 2018, 9:46 AM
Parents
rMf42cd70f18d5: core: New interface gpgme_data_new_from_estream.
Branches
Unknown
Tags
Unknown