mirror of
https://github.com/sheumann/hush.git
synced 2024-12-31 11:31:19 +00:00
fix bug 4464 for real. I am dumb.
This commit is contained in:
parent
9ddc0045ec
commit
728161b556
@ -39,8 +39,7 @@ void* FAST_FUNC xrealloc_vector_helper(void *vector, unsigned sizeof_and_shift,
|
|||||||
if (!(idx & (mask - 1))) {
|
if (!(idx & (mask - 1))) {
|
||||||
sizeof_and_shift >>= 8; /* sizeof(vector[0]) */
|
sizeof_and_shift >>= 8; /* sizeof(vector[0]) */
|
||||||
vector = xrealloc(vector, sizeof_and_shift * (idx + mask + 1));
|
vector = xrealloc(vector, sizeof_and_shift * (idx + mask + 1));
|
||||||
vector = (char*)vector + (sizeof_and_shift * idx);
|
memset((char*)vector + (sizeof_and_shift * idx), 0, sizeof_and_shift * (mask + 1));
|
||||||
memset(vector, 0, sizeof_and_shift * (mask + 1));
|
|
||||||
}
|
}
|
||||||
return vector;
|
return vector;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user