improve version number format check

This commit is contained in:
Christian Grothoff 2021-03-13 23:02:46 +01:00
parent 20bce1bc8e
commit d1c5337a88
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 4 additions and 2 deletions

@ -1 +1 @@
Subproject commit 80b3182db5a5b13a765b2ab8846cb1d0f3281990 Subproject commit 880352a419beee4864f863182dbc695c859ee3f7

View File

@ -712,6 +712,7 @@ decode_keys_json (const json_t *resp_obj,
unsigned int age; unsigned int age;
unsigned int revision; unsigned int revision;
unsigned int current; unsigned int current;
char dummy;
struct GNUNET_JSON_Specification spec[] = { struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_string ("version", GNUNET_JSON_spec_string ("version",
&ver), &ver),
@ -730,7 +731,8 @@ decode_keys_json (const json_t *resp_obj,
"%u:%u:%u", "%u:%u:%u",
&current, &current,
&revision, &revision,
&age)) &age,
&dummy))
{ {
GNUNET_break_op (0); GNUNET_break_op (0);
return GNUNET_SYSERR; return GNUNET_SYSERR;