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
This commit is contained in:
Pascal Massimino 2011-05-05 16:33:40 -07:00
parent 8dfc4c6f17
commit fc0a02e55d

View File

@ -672,7 +672,7 @@ int VP8StatLoop(VP8Encoder* const enc) {
} }
// binary search for a size close to target // 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; const int rd_opt = 1;
float PSNR; float PSNR;
int criterion; int criterion;