summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-02-27 15:37:04 +0100
committerantirez <antirez@gmail.com>2015-02-27 15:37:04 +0100
commit0ace1e6d04c6c7cb38a5e74c4bc5e53aac891905 (patch)
tree792ca7d49f3126e91964d6f2fd9aab5113b36816 /src
parent4e54b85a19027855f05b4c825ad4ac0c71fd9fea (diff)
downloadredis-0ace1e6d04c6c7cb38a5e74c4bc5e53aac891905.tar.gz
Hash: HSTRLEN crash fixed when getting len of int-encoded value
Diffstat (limited to 'src')
-rw-r--r--src/t_hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/t_hash.c b/src/t_hash.c
index 2058dfd8f..2f3487f6a 100644
--- a/src/t_hash.c
+++ b/src/t_hash.c
@@ -159,7 +159,7 @@ size_t hashTypeGetValueLength(robj *o, robj *field) {
robj *aux;
if (hashTypeGetFromHashTable(o, field, &aux) == 0)
- len = sdslen(aux->ptr);
+ len = stringObjectLen(aux);
} else {
redisPanic("Unknown hash encoding");
}