From d1c5337a886128d484d647a4a66da91c3d52f60c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 13 Mar 2021 23:02:46 +0100 Subject: improve version number format check --- src/lib/exchange_api_handle.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c index 405b46419..15fb29aa7 100644 --- a/src/lib/exchange_api_handle.c +++ b/src/lib/exchange_api_handle.c @@ -712,6 +712,7 @@ decode_keys_json (const json_t *resp_obj, unsigned int age; unsigned int revision; unsigned int current; + char dummy; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_string ("version", &ver), @@ -730,7 +731,8 @@ decode_keys_json (const json_t *resp_obj, "%u:%u:%u", ¤t, &revision, - &age)) + &age, + &dummy)) { GNUNET_break_op (0); return GNUNET_SYSERR; -- cgit v1.2.3