]> source.dussan.org Git - rspamd.git/commitdiff
Fix 'classic' sizeof(pointer) error.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 6 Dec 2013 13:05:59 +0000 (13:05 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 6 Dec 2013 13:05:59 +0000 (13:05 +0000)
src/statfile.c

index 35dd541724b6c78138afba304cd652c7557217aa..9df60fd56d76b02ae17637822dccde408facab2f 100644 (file)
@@ -235,7 +235,7 @@ statfile_pool_reindex (statfile_pool_t * pool, gchar *filename, size_t old_size,
        }
 
        pos = map + (sizeof (struct stat_file) - sizeof (struct stat_file_block));
-       while (old_size - (pos - map) >= sizeof (block)) {
+       while (old_size - (pos - map) >= sizeof (struct stat_file_block)) {
                block = (struct stat_file_block *)pos;
                if (block->hash1 != 0 && block->value != 0) {
                        statfile_pool_set_block_common (pool, new, block->hash1, block->hash2, 0, block->value, FALSE);