From: Eric Bollengier Date: Mon, 5 Dec 2011 10:32:10 +0000 (+0100) Subject: Update accurate code to use 1 byte instead of 3 X-Git-Tag: Release-7.0.0~410 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ce8862e2d46c6b9b21fef68f231258cff3606c41;p=bacula%2Fbacula Update accurate code to use 1 byte instead of 3 --- diff --git a/bacula/src/filed/accurate.c b/bacula/src/filed/accurate.c index 3479cd5eca..1c50411ceb 100644 --- a/bacula/src/filed/accurate.c +++ b/bacula/src/filed/accurate.c @@ -213,9 +213,9 @@ static bool accurate_add_file(JCR *jcr, uint32_t len, CurFile *item; /* we store CurFile, fname and ctime/mtime in the same chunk - * we need some extra bytes to handle an empty chksum + * we need one extra byte to handle an empty chksum */ - item = (CurFile *)jcr->file_list->hash_malloc(sizeof(CurFile)+len+3); + item = (CurFile *)jcr->file_list->hash_malloc(sizeof(CurFile)+len+1); item->seen = 0; /* TODO: see if we can optimize this part with memcpy instead of strcpy */