Skip to content

Commit 9ff8f49

Browse files
committed
redis_set_cmd when iterating over the arguments array improperly checked key value (when handling the non-string key case) instead of the value
1 parent 33bb629 commit 9ff8f49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redis_commands.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ int redis_set_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
12501250

12511251
/* Expiry can't be set < 1 */
12521252
if (expire < 1) return FAILURE;
1253-
} else if (Z_TYPE_P(v) == IS_STRING && k != NULL && IS_EX_PX_ARG(k->val)) {
1253+
} else if (Z_TYPE_P(v) == IS_STRING && IS_NX_XX_ARG(Z_STRVAL_P(v))) {
12541254
set_type = Z_STRVAL_P(v);
12551255
}
12561256
}

0 commit comments

Comments
 (0)