avifil32/tests: [2/2] Add a test for AVISaveOptions and fix thedetected crash
Detlef Riekenberg
wine.dev at web.de
Sun May 25 17:25:39 CDT 2008
On Sa, 2008-05-24 at 12:06 +0900, Dmitry Timoshkov wrote:
> "Detlef Riekenberg" <wine.dev at web.de> wrote:
>
> > - for (; nStreams > 0; nStreams--) {
> > + for (nStreams--; nStreams >= 0; nStreams--) {
> > if (ppOptions[nStreams] != NULL) {
> > ppOptions[nStreams]->dwFlags &= ~AVICOMPRESSF_VALID;
>
> Shouldn't this be
>
> for (nStreams - 1; nStreams >= 0; nStreams--) {
>
> instead?
No.
You still read the memory after the array,
since nStreams is used as index.
--
By by ... Detlef
More information about the wine-devel
mailing list