Make memory checker happy about FileGlobal
FileGlobal structure in write_global() didn't initialize the while build_hash property and only placed there null terminated meaningful content, leaving trailing uninitialized. This made valgrind complain about using uninitialized memory later in undo stack.
This commit is contained in:
@@ -3274,6 +3274,7 @@ static void write_global(WriteData *wd, int fileflags, Main *mainvar)
|
||||
/* prevent mem checkers from complaining */
|
||||
fg.pads= 0;
|
||||
memset(fg.filename, 0, sizeof(fg.filename));
|
||||
memset(fg.build_hash, 0, sizeof(fg.build_hash));
|
||||
|
||||
current_screen_compat(mainvar, &screen);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user