dovecot-2.2: lib: data-stack - add vital sanity-preserving asser...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jul 28 13:54:28 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/90a8729d81c8
changeset: 17646:90a8729d81c8
user: Phil Carmody <phil at dovecot.fi>
date: Mon Jul 28 16:45:33 2014 +0300
description:
lib: data-stack - add vital sanity-preserving assert to t_pop
If something has re-ordered those two offsets, the following memset
will explode.
Signed-off-by: Phil Carmody <phil at dovecot.fi>
diffstat:
src/lib/data-stack.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diffs (11 lines):
diff -r 87629dec23f1 -r 90a8729d81c8 src/lib/data-stack.c
--- a/src/lib/data-stack.c Mon Jul 28 16:45:33 2014 +0300
+++ b/src/lib/data-stack.c Mon Jul 28 16:45:33 2014 +0300
@@ -278,6 +278,7 @@
pos = current_block->size -
current_frame_block->block_space_used[frame_pos];
used_size = current_block->size - current_block->lowwater;
+ i_assert(used_size >= pos);
memset(STACK_BLOCK_DATA(current_block) + pos, CLEAR_CHR,
used_size - pos);
}
More information about the dovecot-cvs
mailing list