mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-31 12:09:35 -05:00
Fix ITS#3695 preserve stack alignment in slap_sl_realloc
This commit is contained in:
parent
8045a0882e
commit
43cd22a639
1 changed files with 4 additions and 0 deletions
|
|
@ -376,6 +376,10 @@ slap_sl_realloc(void *ptr, ber_len_t size, void *ctx)
|
|||
}
|
||||
|
||||
if (sh->sh_stack) {
|
||||
/* round up to doubleword boundary */
|
||||
size += pad + sizeof( ber_len_t );
|
||||
size &= ~pad;
|
||||
|
||||
/* Never shrink blocks */
|
||||
if (size <= p[-1]) {
|
||||
new = p;
|
||||
|
|
|
|||
Loading…
Reference in a new issue