Skip to content
Snippets Groups Projects
Commit b70d3759 authored by Howard Chu's avatar Howard Chu
Browse files

Fix ITS#3420

parent bc09291b
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment