From 35a89dde15007d28c6796926708e8f0b5ee60d74 Mon Sep 17 00:00:00 2001 From: rbpotter Date: Mon, 23 Jan 2017 16:41:08 -0800 Subject: Fix bug found by fuzzer in A85 encoder (bad shift). A85 encoder is not called yet; fix before adding calls to this code in Chromium. BUG=682550 Review-Url: https://codereview.chromium.org/2649263002 --- core/fxcodec/codec/fx_codec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/fxcodec/codec/fx_codec.cpp b/core/fxcodec/codec/fx_codec.cpp index 23171cf3ea..3edf8924c3 100644 --- a/core/fxcodec/codec/fx_codec.cpp +++ b/core/fxcodec/codec/fx_codec.cpp @@ -229,7 +229,7 @@ bool CCodec_BasicModule::A85Encode(const uint8_t* src_buf, uint32_t val = 0; int count = 0; while (pos < src_size) { - val += (uint32_t)(src_buf[pos] << (8 * (3 - pos))); + val += (uint32_t)(src_buf[pos]) << (8 * (3 - count)); count++; pos++; } -- cgit v1.2.3