shlexec: Fixes for buffer overrun problems
Alexandre Julliard
julliard at winehq.org
Thu Dec 11 22:23:14 CST 2003
Andrew de Quincey <adq_dvb at lidskialf.net> writes:
> Hi, this is a cleanup of shell32/shlexec.c to remove potential buffer
> overruns. I've also tried to make parts of the code a little easier to
> follow, without affecting the functionality.
It's a very inefficient mechanism, you are reallocating the same
string over and over to append sometimes only a single char. The right
way to avoid overflows is to compute the length of the full string
first and then allocate all the needed space at once.
--
Alexandre Julliard
julliard at winehq.com
More information about the wine-devel
mailing list