summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenis Vlasenko2008-08-06 08:44:09 +0000
committerDenis Vlasenko2008-08-06 08:44:09 +0000
commit728161b5564afb94c5518fc440e8152f01e46068 (patch)
tree325785cd27c540e7a3827cbd621a6b54cd5c68b1 /libbb
parent9ddc0045ec1ae648cfd510b95621d1f7a729a85c (diff)
downloadbusybox-728161b5564afb94c5518fc440e8152f01e46068.zip
busybox-728161b5564afb94c5518fc440e8152f01e46068.tar.gz
fix bug 4464 for real. I am dumb.
Diffstat (limited to 'libbb')
-rw-r--r--libbb/xrealloc_vector.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libbb/xrealloc_vector.c b/libbb/xrealloc_vector.c
index 43c34b7..bbd5ab8 100644
--- a/libbb/xrealloc_vector.c
+++ b/libbb/xrealloc_vector.c
@@ -39,8 +39,7 @@ void* FAST_FUNC xrealloc_vector_helper(void *vector, unsigned sizeof_and_shift,
if (!(idx & (mask - 1))) {
sizeof_and_shift >>= 8; /* sizeof(vector[0]) */
vector = xrealloc(vector, sizeof_and_shift * (idx + mask + 1));
- vector = (char*)vector + (sizeof_and_shift * idx);
- memset(vector, 0, sizeof_and_shift * (mask + 1));
+ memset((char*)vector + (sizeof_and_shift * idx), 0, sizeof_and_shift * (mask + 1));
}
return vector;
}