This is just an extra safety measure against buffer overflows.
Patch by Jann Horn.
struct stack_block *next;
size_t size, left, lowwater;
+ /* always NULL and here just in case something accesses
+ the memory in front of an allocated area */
+ char *nullpad;
/* unsigned char data[]; */
};
block->left = 0;
block->lowwater = block->size;
block->next = NULL;
+ block->nullpad = NULL;
#ifdef DEBUG
memset(STACK_BLOCK_DATA(block), CLEAR_CHR, alloc_size);