comctl32: tooltips: avoid buffer overrun (spotted by, bug #8361), make sure some strings are NUL-terminated

Alexandre Julliard julliard at
Thu Jul 19 06:20:19 CDT 2007

Mikołaj Zalewski <mikolaj at> writes:

>  I forgot that only lstrlenW has an exception handler. There is  a
> (somewhat broken) support for non-NULL-terminated string it in the
> current code and I don't know why it was added so I didn't want to
> remove it. But the main part of the patch is the min instead of
> max. Should I change strlenW to lstrlenW or should I remove the
> non-NULL-terminated support?

lstrlenW doesn't have an exception handler inside Wine code so it
wouldn't help, and even if it did it would still only be hiding the
bug. I think the non-null-terminated support should simply be killed,
unless there is a test case that shows that it is needed.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list