This commit is contained in:
osboxes.org 2019-12-31 21:39:37 +01:00
parent 48eeceae58
commit bd1244287f

View file

@ -222,7 +222,7 @@ int hashtable_set(hashtable_t *hashtable, const char *key, json_t *value) {
allocated. */
size_t len = strlen(key);
if (len >= (size_t) -1 - offsetof(pair_t, key)) {
if (len >= (size_t) - 1 - offsetof(pair_t, key)) {
/* Avoid an overflow if the key is very long */
return -1;
}