]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
t_buffer_get() overflow check worked only with 64bit systems.
authorTimo Sirainen <tss@iki.fi>
Tue, 1 Apr 2008 08:42:24 +0000 (11:42 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 1 Apr 2008 08:42:24 +0000 (11:42 +0300)
--HG--
branch : HEAD

src/lib/data-stack.c

index 35a17bd4211673bebdab345940c90cdcb2b39bf0..0798e9f3ce551f9640860bf791cbd2d15af31f6a 100644 (file)
@@ -81,7 +81,7 @@ static void data_stack_last_buffer_reset(void)
 
                p = STACK_BLOCK_DATA(current_block) +
                        (current_block->size - current_block->left) +
-                       MEM_ALIGN(sizeof(size_t) + last_buffer_size);
+                       MEM_ALIGN(sizeof(size_t)) + MEM_ALIGN(last_buffer_size);
 #endif
                /* reset t_buffer_get() mark - not really needed but makes it
                   easier to notice if t_malloc()/t_push()/t_pop() is called