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)
Fix not-NULL terminated char buffers and char[] to string conversion.
Valgrind logs:
Invalid read of size 1
at 0x4C2D7D4: __GI_strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x5318BAF: std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
by 0x409471: ReadBuild(int) (System.cpp:189)
by 0x40CEC6: main (System.cpp:1108)
Address 0x5f851ee is 0 bytes after a block of size 94 alloc'd
at 0x4C2C037: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x40F63A: MPQFile::MPQFile(char const*) (mpq_libmpq.cpp:65)
by 0x409408: ReadBuild(int) (System.cpp:182)
by 0x40CEC6: main (System.cpp:1108)
Invalid read of size 1
at 0x57FFCAC: strtok (strtok.S:165)
by 0x40D279: MPQArchive::GetFileListTo(std::vector<std::string, std::allocator<std::string> >&) (mpq_libmpq04.h:45)
by 0x40C5CF: ExtractDBCFiles(int, bool) (System.cpp:1001)
by 0x40CEF5: main (System.cpp:1110)
Address 0x5f91e27 is 0 bytes after a block of size 44,391 alloc'd
at 0x4C2C037: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x40D1A5: MPQArchive::GetFileListTo(std::vector<std::string, std::allocator<std::string> >&) (mpq_libmpq04.h:30)
by 0x40C5CF: ExtractDBCFiles(int, bool) (System.cpp:1001)
by 0x40CEF5: main (System.cpp:1110)
* Complete changelog can be found at http://code.google.com/p/recastnavigation/
* Adjusted a few config values
Important:
* New mmaps extraction is required
* Folder size will be increased