mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Fix ITS#3695 preserve stack alignment in slap_sl_realloc
This commit is contained in:
parent
8045a0882e
commit
43cd22a639
@ -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 New Issue
Block a user