From e5a7ed24c6ca1f54ae7564d3395c3b4b8a68c5ba Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Sun, 23 Jan 2011 17:23:13 +0100 Subject: [PATCH] Change accurate CurFile allocation size The given length counts already the 3 \0 --- bacula/src/filed/accurate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bacula/src/filed/accurate.c b/bacula/src/filed/accurate.c index 9883bf24ef..a0fddc579b 100644 --- a/bacula/src/filed/accurate.c +++ b/bacula/src/filed/accurate.c @@ -207,8 +207,7 @@ static bool accurate_add_file(JCR *jcr, uint32_t len, CurFile *item; /* we store CurFile, fname and ctime/mtime in the same chunk */ - /* TODO: see if len contains already the 3 \0 */ - item = (CurFile *)jcr->file_list->hash_malloc(sizeof(CurFile)+len+3); + item = (CurFile *)jcr->file_list->hash_malloc(sizeof(CurFile)+len); item->seen = 0; /* TODO: see if we can optimize this part with memcpy instead of strcpy */ -- 2.39.5