json: Add guard in create_keylist_patterns
* src/gpgme-json.c (create_keylist_patterns): Guard against a string ending with a linbreak.
This commit is contained in:
parent
1ff16dad59
commit
10683b1a91
@ -691,7 +691,7 @@ create_keylist_patterns (cjson_t request)
|
|||||||
tmp = p + 1;
|
tmp = p + 1;
|
||||||
}
|
}
|
||||||
/* The last key is not newline delimted. */
|
/* The last key is not newline delimted. */
|
||||||
ret[i++] = xstrdup (tmp);
|
ret[i++] = *tmp ? xstrdup (tmp) : NULL;
|
||||||
ret[i] = NULL;
|
ret[i] = NULL;
|
||||||
|
|
||||||
xfree (keystring);
|
xfree (keystring);
|
||||||
|
Loading…
Reference in New Issue
Block a user