mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-16 05:10:40 +01:00
fix hashtable realloc memset range
This commit is contained in:
parent
e975ab99d7
commit
209213cadc
@ -129,7 +129,8 @@ hashtable_expand(struct hashtable *h)
|
||||
realloc(h->table, newsize * sizeof(struct entry *));
|
||||
if (NULL == newtable) { (h->primeindex)--; return 0; }
|
||||
h->table = newtable;
|
||||
memset(newtable[h->tablelength], 0, newsize - h->tablelength);
|
||||
memset(&newtable[h->tablelength], 0,
|
||||
(newsize - h->tablelength) * sizeof(struct entry *));
|
||||
for (i = 0; i < h->tablelength; i++) {
|
||||
for (pE = &(newtable[i]), e = *pE; e != NULL; e = *pE) {
|
||||
idx = indexFor(newsize,e->h);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user