- Don't try to get the length of a possibly empty string. This fixes
many menu applications (such as WinRAR). However I'm now getting a bug
due to a double-free. It seems a GDI Object is being freed twice. Can
anyone check this out please?
Modified: trunk/reactos/lib/user32/windows/menu.c
_____
Modified: trunk/reactos/lib/user32/windows/menu.c
--- trunk/reactos/lib/user32/windows/menu.c 2005-07-25 23:19:12 UTC
(rev 16727)
+++ trunk/reactos/lib/user32/windows/menu.c 2005-07-26 00:43:19 UTC
(rev 16728)
@@ -3771,8 +3771,11 @@
}
RtlCopyMemory(mii, &miiW, miiW.cbSize);
- mii->dwTypeData = AnsiBuffer;
- mii->cch = strlen(AnsiBuffer);
+ if (AnsiBuffer)
+ {
+ mii->dwTypeData = AnsiBuffer;
+ mii->cch = strlen(AnsiBuffer);
+ }
return TRUE;
}
Fix stupid typo-mistake, which lead to allocating only 4 bytes intead of
sizeof(struct pci_pool).
Modified: trunk/reactos/drivers/usb/cromwell/sys/linuxwrapper.c
_____
Modified: trunk/reactos/drivers/usb/cromwell/sys/linuxwrapper.c
--- trunk/reactos/drivers/usb/cromwell/sys/linuxwrapper.c
2005-07-25 20:28:29 UTC (rev 16725)
+++ trunk/reactos/drivers/usb/cromwell/sys/linuxwrapper.c
2005-07-25 21:09:21 UTC (rev 16726)
@@ -608,8 +608,8 @@
} else if (allocation < size)
return 0;
- retval = ExAllocatePool(NonPagedPool, sizeof(retval)); //FIXME:
Should it be non-paged?
-
// pci_pool is rather big struct
+ retval = ExAllocatePool(NonPagedPool, sizeof(struct pci_pool));
// Non-paged because could be
+
// pci_pool is rather big struct
// fill retval structure
strncpy (retval->name, name, sizeof retval->name);