json: Don't use strdup but the xtrystrdup wrapper.
authorWerner Koch <wk@gnupg.org>
Thu, 19 Jul 2018 07:46:57 +0000 (09:46 +0200)
committerWerner Koch <wk@gnupg.org>
Thu, 19 Jul 2018 07:53:37 +0000 (09:53 +0200)
commitaf2c74d6c06a9fb08f7de15d41162d09f871a62e
tree494c2cc90c4a2a23c156ca868bb14e1752fda94b
parentf42cd70f18d53df47cc2d027bade736377d39b71
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>
src/gpgme-json.c