Permalink
Browse files

Fix off-by-one error.

  • Loading branch information...
1 parent 911fcae commit 7e5e34653d98b4a125993de74c2aaed8bd1c45e9 @nicolasff nicolasff committed Mar 16, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 formats/raw.c
View
@@ -73,7 +73,7 @@ raw_array(const redisReply *r, size_t *sz) {
}
/* allocate */
- p = ret = malloc(*sz);
+ p = ret = malloc(1+*sz);
p += sprintf(p, "*%zd\r\n", r->elements);
/* copy */

0 comments on commit 7e5e346

Please sign in to comment.