Fix EMBSTR corruption
This commit is contained in:
parent
0ccceddae0
commit
0ebf0f7338
@ -124,9 +124,7 @@ robj *activeDefragStringOb(robj* ob, long *defragged) {
|
|||||||
} else if (ob->encoding==OBJ_ENCODING_EMBSTR) {
|
} else if (ob->encoding==OBJ_ENCODING_EMBSTR) {
|
||||||
/* The sds is embedded in the object allocation, calculate the
|
/* The sds is embedded in the object allocation, calculate the
|
||||||
* offset and update the pointer in the new allocation. */
|
* offset and update the pointer in the new allocation. */
|
||||||
long ofs = (intptr_t)ptrFromObj(ob) - (intptr_t)ob;
|
|
||||||
if ((ret = activeDefragAlloc(ob))) {
|
if ((ret = activeDefragAlloc(ob))) {
|
||||||
ret->m_ptr = (void*)((intptr_t)ret + ofs);
|
|
||||||
(*defragged)++;
|
(*defragged)++;
|
||||||
}
|
}
|
||||||
} else if (ob->encoding!=OBJ_ENCODING_INT) {
|
} else if (ob->encoding!=OBJ_ENCODING_INT) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user