Merge 16728 (ion) from trunk:
- 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: branches/ros-branch-0_2_7/reactos/lib/user32/windows/menu.c
_____
Modified: branches/ros-branch-0_2_7/reactos/lib/user32/windows/menu.c
--- branches/ros-branch-0_2_7/reactos/lib/user32/windows/menu.c
2005-08-03 17:10:45 UTC (rev 17012)
+++ branches/ros-branch-0_2_7/reactos/lib/user32/windows/menu.c
2005-08-03 17:13:04 UTC (rev 17013)
@@ -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;
}
Show replies by date