diff options
author | jackpoz <giacomopoz@gmail.com> | 2013-09-29 12:26:56 +0200 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2013-09-29 12:26:56 +0200 |
commit | a1fa7bf52513c388203590ab63c3c2297c971a32 (patch) | |
tree | a38fbb5a5defe675212408bdb18007e5a33740a1 /src/server/game/Scripting/ScriptMgr.cpp | |
parent | a68c29e15c83bc7be1910083b26d152e2a6c80b3 (diff) |
Tools/VMAP Extractor: Fix memory issues
Fix not-NULL terminated char buffer and uninitialized memory written to vmaps due to WMOLiquidHeader struct padding bytes left uninitialized. The padding bytes should be ignored anyway by VMAP Assembler so no re-extraction is required.
Valgrind log:
Syscall param write(buf) points to uninitialised byte(s)
at 0x585FB50: __write_nocancel (syscall-template.S:81)
by 0x57EE2F2: _IO_file_write@@GLIBC_2.2.5 (fileops.c:1270)
by 0x57EE1D1: new_do_write (fileops.c:546)
by 0x57EF904: _IO_do_write@@GLIBC_2.2.5 (fileops.c:519)
by 0x57EEB70: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1341)
by 0x57E3EC4: fwrite (iofwrite.c:43)
by 0x41161B: WMOGroup::ConvertToVMAPGroupWmo(_IO_FILE*, WMORoot*, bool) (wmo.cpp:386)
by 0x407FA9: ExtractSingleWmo(std::string&) (vmapexport.cpp:215)
by 0x407B16: ExtractWmo() (vmapexport.cpp:138)
by 0x409D50: main (vmapexport.cpp:497)
Address 0x40398e2 is not stack'd, malloc'd or (recently) free'd
Uninitialised value was created by a heap allocation
at 0x4C2C7A7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x410ADA: WMOGroup::open() (wmo.cpp:224)
by 0x407F54: ExtractSingleWmo(std::string&) (vmapexport.cpp:208)
by 0x407B16: ExtractWmo() (vmapexport.cpp:138)
by 0x409D50: main (vmapexport.cpp:497)
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.cpp')
0 files changed, 0 insertions, 0 deletions