Skip to content

Commit

Permalink
[dbops] fix +1 overreading during memcmp
Browse files Browse the repository at this point in the history
Reported by CI
  • Loading branch information
bogdan-iancu committed Mar 12, 2024
1 parent 5efa82f commit 254fa4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/dbops/dbops_db.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ static inline int _json_to_filters(cJSON *Jfilter,
if (node->type==cJSON_Object) {
node = node->child;
ops[i] = node->string;
if (only_equal && memcmp(ops[i],OP_EQ,sizeof(OP_EQ)+1)) {
if (only_equal && memcmp(ops[i],OP_EQ,sizeof(OP_EQ))) {
LM_ERR("only equal allowed between keys and values at "
"pos %d\n",i);
goto error;
Expand Down

0 comments on commit 254fa4b

Please sign in to comment.