zipmap fix for large values

This commit is contained in:
antirez
2010-03-18 03:23:44 +01:00
parent db5946fc27
commit ad6de43c80
4 changed files with 17 additions and 2 deletions

View File

@ -116,7 +116,7 @@ static unsigned int zipmapDecodeLength(unsigned char *p) {
unsigned int len = *p;
if (len < ZIPMAP_BIGLEN) return len;
memcpy(&len,p,sizeof(unsigned int));
memcpy(&len,p+1,sizeof(unsigned int));
return len;
}