json: Fix crash by ensuring response is never NULL
authorAndre Heinecke <aheinecke@intevation.de>
Wed, 18 Jul 2018 11:02:32 +0000 (13:02 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Wed, 18 Jul 2018 11:05:48 +0000 (13:05 +0200)
commit82e4b900a96c837392259469a9a5821a95e7a707
tree534d1de3fa528f286b427c87fa9e0dd08c0c1c24
parentb78140daf7720132711314a4e5ed878b49da99f4
json: Fix crash by ensuring response is never NULL

* src/gpgme-json.c (encode_and_chunk): Try to always
return at least an error.
(process_request): Double check that it does not return NULL.

--
If process_request returns NULL the following strlen on it
would crash.
src/gpgme-json.c