André Hentschel a écrit :
Eric Pouech schrieb:
Hi André
a couple of comments to your patch
always welcome!
IMO, we should also test that cbReserved2 is >= sizeof(unsigned)
otherwise we'd be in trouble
maybe you had something like that patch in mind:
http://www.winehq.org/pipermail/wine-patches/2009-August/077766.html
it checks if the size makes sense
no
I'm just saying that since we do something like *(unsigned*)lpReserved,
we'd better check that cbReserved2 >= sizeof(unsigned)
I don't think that your patch is correct. If you want a coding of the
"reserved" block, that you can extend, I think you could well have
additional information *after* the block of handles+flags we're considering
therefore the valid tests I see would be:
cdReserved2 >= sizeof(unsigned)
numH = *(unsigned*)lpReserved2
error if sizeof(unsigned) + numH*(1+sizeof(HANDLE)) > cbReserved2
A+
--
Eric Pouech
"The problem with designing something completely foolproof is to underestimate the
ingenuity of a complete idiot." (Douglas Adams)