json: Ensure that native msging request is string
authorAndre Heinecke <aheinecke@intevation.de>
Wed, 18 Jul 2018 11:06:08 +0000 (13:06 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Wed, 18 Jul 2018 11:06:08 +0000 (13:06 +0200)
commit6d7b4382c3e12ba1dbbd0762dfa850c76750d838
tree3122124527fe3cabc6808c2f36c86e7bbc45557e
parent82e4b900a96c837392259469a9a5821a95e7a707
json: Ensure that native msging request is string

* src/gpgme-json.c (native_messaging_repl): Ensure that the
request is NULL terminated.

--
This avoids potential memory leaks and access to unmapped memory
in case the request was not terminated.
Other request functions use es_read_line which gurantees NULL
termination.
src/gpgme-json.c