From: <gi...@ba...> - 2011-12-05 08:26:35
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Bacula Community source". The branch, Branch-5.3 has been updated via 0b62893c4c11dbf9ddbb122d8c13e22bbf8d8d11 (commit) from c0e0fd9ad3f9d4165956279d527efc7835031cd8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0b62893c4c11dbf9ddbb122d8c13e22bbf8d8d11 Author: Eric Bollengier <er...@ba...> Date: Mon Dec 5 09:24:45 2011 +0100 Fix segfault in accurate code This segfault was introduced while cleaning the code. ----------------------------------------------------------------------- Summary of changes: diff --git a/bacula/src/filed/accurate.c b/bacula/src/filed/accurate.c index 3a043a3..3479cd5 100644 --- a/bacula/src/filed/accurate.c +++ b/bacula/src/filed/accurate.c @@ -212,8 +212,10 @@ static bool accurate_add_file(JCR *jcr, uint32_t len, bool ret = true; CurFile *item; - /* we store CurFile, fname and ctime/mtime in the same chunk */ - item = (CurFile *)jcr->file_list->hash_malloc(sizeof(CurFile)+len); + /* we store CurFile, fname and ctime/mtime in the same chunk + * we need some extra bytes to handle an empty chksum + */ + item = (CurFile *)jcr->file_list->hash_malloc(sizeof(CurFile)+len+3); item->seen = 0; /* TODO: see if we can optimize this part with memcpy instead of strcpy */ hooks/post-receive -- Bacula Community source |