Version info fix
François Gouget
fgouget at codeweavers.com
Fri Mar 23 02:14:17 CST 2001
It seems that some dlls (e.g. npqtplugin.dll) have lots of padding
with zeros in their version information. This lead to a buffer overrun
in ConvertVersionInfo32To16, with the consequences that can be expected.
This patch considers a 0-byte child to mark the end of the child
list. But I still don't understand why one would put hundreds of bytes
of padding in the version information.
Changelog:
François Gouget <fgouget at codeweavers.com>
* dlls/version/info.c
ConvertVersionInfo32To16: the end of the child list may also be
marked by a 0-byte child
--
François Gouget
fgouget at codeweavers.com
-------------- next part --------------
Index: dlls/version/info.c
===================================================================
RCS file: /home/wine/wine/dlls/version/info.c,v
retrieving revision 1.29
diff -u -r1.29 info.c
--- dlls/version/info.c 2001/03/19 19:15:36 1.29
+++ dlls/version/info.c 2001/03/23 07:46:16
@@ -243,7 +243,7 @@
/* Convert children */
child16 = VersionInfo16_Children( info16 );
- while ( (DWORD)child32 < (DWORD)info32 + wLength )
+ while ( (DWORD)child32 < (DWORD)info32 + wLength && child32->wLength != 0 )
{
VS_VERSION_INFO_STRUCT32 *nextChild = VersionInfo32_Next( child32 );
More information about the wine-patches
mailing list