shlexec: Fixes for buffer overrun problems
Andrew de Quincey
adq_dvb at lidskialf.net
Fri Dec 12 03:51:19 CST 2003
On Friday 12 December 2003 04:23, Alexandre Julliard wrote:
> 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.
I considered that, but I didn't really think that that piece of code would
really be used that often for it to make a difference under wine.. and I
didn't want to optimise unless its necessary.
However, I'll change it as requested. Its unlikely to be pretty though.
More information about the wine-devel
mailing list