From fc0a02e55d54552f1ba8dfa162fca22c36e85a1c Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Thu, 5 May 2011 16:33:40 -0700 Subject: [PATCH] fix the dichotomy loop we were reading past the end of the dqs[] array. reported by Mathias Schindler (on cygwin only) http://code.google.com/p/webp/issues/detail?id=71 Change-Id: Ib38c4c139e3cac3e8915626d63e16b403d6bbd63 --- src/enc/frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/enc/frame.c b/src/enc/frame.c index 132077b3..1934b02d 100644 --- a/src/enc/frame.c +++ b/src/enc/frame.c @@ -672,7 +672,7 @@ int VP8StatLoop(VP8Encoder* const enc) { } // binary search for a size close to target - for (pass = 0; pass < enc->config_->pass || (dqs[pass] > 0); ++pass) { + for (pass = 0; pass < enc->config_->pass && (dqs[pass] > 0); ++pass) { const int rd_opt = 1; float PSNR; int criterion;