diff options
author | Denis Vlasenko | 2008-08-05 21:12:00 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-08-05 21:12:00 +0000 |
commit | db29f5e73e1c44e9f30aa6e78c9eee159b901892 (patch) | |
tree | 5652e5f166997c839a41f763857d9932021e4be6 | |
parent | e6ce824edd2dee1b03b226ae9dd55e085257d5dd (diff) | |
download | busybox-db29f5e73e1c44e9f30aa6e78c9eee159b901892.zip busybox-db29f5e73e1c44e9f30aa6e78c9eee159b901892.tar.gz |
libbb: fix thinko in latest xrealloc_vector change
-rw-r--r-- | libbb/xrealloc_vector.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/xrealloc_vector.c b/libbb/xrealloc_vector.c index 342ae53..43c34b7 100644 --- a/libbb/xrealloc_vector.c +++ b/libbb/xrealloc_vector.c @@ -39,7 +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 += idx; + vector = (char*)vector + (sizeof_and_shift * idx); memset(vector, 0, sizeof_and_shift * (mask + 1)); } return vector; |