CDVD: initialize a temporary buffer

I'm not sure to understand why Valgrind reports it as we populate the buffer
during the ReadAsync. Maybe Valgrind doesn't like async IO from the kernel.

In doubt, the init will avoid those warnings

==19897== Thread 6 EE Core:
==19897== Conditional jump or move depends on uninitialised value(s)
==19897==    at 0x80FE9E1: BlockdumpFileReader::DetectBlockdump(AsyncFileReader*) (BlockdumpFileReader.cpp:40)
==19897==    by 0x8109EE5: InputIsoFile::Open(wxString const&, bool) (InputIsoFile.cpp:229)
==19897==    by 0x810939E: ISOopen(char const*) (CDVDisoReader.cpp:57)
==19897==    by 0x810194E: DoCDVDopen() (CDVDaccess.cpp:359)
==19897==    by 0x80B651C: SysCorePlugins::OpenPlugin_CDVD() (PluginManager.cpp:1219)
This commit is contained in:
Gregory Hainaut 2016-07-19 19:51:31 +02:00
parent 3c0a97354c
commit b322ef286e
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ bool BlockdumpFileReader::DetectBlockdump(AsyncFileReader* reader)
reader->SetBlockSize(1);
char buf[4];
char buf[5] = {0};
reader->ReadSync(buf, 0, 4);
bool isbd = (strncmp(buf, "BDV2", 4) == 0);