[PATCH] comctl32: Avoid an unneeded lstrlenW() call.
Dmitry Timoshkov
dmitry at baikal.ru
Mon Oct 22 00:55:08 CDT 2018
Zhiyi Zhang <zzhang at codeweavers.com> wrote:
> > @@ -2435,7 +2435,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
> > btnInfo->btn = nmtb.tbButton;
> > if (!(nmtb.tbButton.fsStyle & BTNS_SEP))
> > {
> > - if (lstrlenW(nmtb.pszText))
> > + if (*nmtb.pszText)]
> There is a behavior change with this modification. lstrlenW won't crash even if applications somehow
> replaced pszText with null. So we might want to check that pszText is not null before deferencing it.
Have a look at include/winbase.h: lstr* APIs in Wine code are silently
replaced by inline versions without an exception handler.
--
Dmitry.
More information about the wine-devel
mailing list