Skip to content

Commit

Permalink
redis keys must be less than mbuf_data_size() in length
Browse files Browse the repository at this point in the history
  • Loading branch information
manjuraj committed Apr 13, 2013
1 parent a1d4b71 commit 4dbb530
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/proto/nc_redis.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,11 +960,11 @@ redis_parse_req(struct msg *r)
"key", r->id, r->type);
goto error;
}
if (r->rlen > mbuf_data_size()) {
if (r->rlen >= mbuf_data_size()) {
log_error("parsed bad req %"PRIu64" of type %d with key "
"length %d that exceeds maximum redis key "
"length of %d", r->id, r->type, r->rlen,
mbuf_data_size());
"length %d that greater than or equal to maximum"
" redis key length of %d", r->id, r->type,
r->rlen, mbuf_data_size());
goto error;
}
if (r->rnarg == 0) {
Expand Down

0 comments on commit 4dbb530

Please sign in to comment.