Permalink
Browse files

Fix off-by-one bug when ensuring that there is at least 1 byte to par…

…se for the number of keys in an EVAL/EVALSHA invocation.
  • Loading branch information...
1 parent 48f5e50 commit 319dd87043ce244a2ed20d06ee9061682da8715f @ferenyx ferenyx committed Jan 30, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/proto/nc_redis.c
View
@@ -1152,7 +1152,7 @@ redis_parse_req(struct msg *r)
// we need to error out if number of keys is 0.
// At this point, both p and m point to the end of the argument
// and r->token points to the start.
- if (p - r->token <= 1)
+ if (p - r->token < 1)
goto error;
uint32_t nkeys = 0;
for (uint8_t *chp = r->token; chp < p; chp++) {

0 comments on commit 319dd87

Please sign in to comment.