mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-02 04:59:39 -05:00
Fix ITS#3420
This commit is contained in:
parent
bc09291b81
commit
b70d375964
1 changed files with 2 additions and 1 deletions
|
|
@ -376,7 +376,8 @@ slap_sl_realloc(void *ptr, ber_len_t size, void *ctx)
|
|||
new = p;
|
||||
|
||||
/* If reallocing the last block, we can grow it */
|
||||
} else if ((char *)ptr + p[-1] == sh->sh_last) {
|
||||
} else if ((char *)ptr + p[-1] == sh->sh_last &&
|
||||
(char *)ptr + size < (char *)sh->sh_end ) {
|
||||
new = p;
|
||||
sh->sh_last = (char *)sh->sh_last + size - p[-1];
|
||||
p[-1] = size;
|
||||
|
|
|
|||
Loading…
Reference in a new issue