Merge /home/john/repos/redis_clean into unstable

Former-commit-id: 6157a5fc1be920085a136e43cdb23cf9dd724390
This commit is contained in:
John Sully 2019-03-14 14:22:41 -04:00
commit f25d4bf94e

View File

@ -614,6 +614,10 @@ int hllSparseToDense(robj *o) {
} else {
runlen = HLL_SPARSE_VAL_LEN(p);
regval = HLL_SPARSE_VAL_VALUE(p);
if ((runlen + idx) > HLL_REGISTERS) {
sdsfree(dense);
return C_ERR;
}
while(runlen--) {
HLL_DENSE_SET_REGISTER(hdr->registers,idx,regval);
idx++;
@ -1088,6 +1092,8 @@ int hllMerge(uint8_t *max, size_t cmax, robj *hll) {
} else {
runlen = HLL_SPARSE_VAL_LEN(p);
regval = HLL_SPARSE_VAL_VALUE(p);
if ((runlen + i) > HLL_REGISTERS)
return C_ERR;
while(runlen--) {
if (i < 0 || (size_t)i >= cmax)
return C_ERR;