summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-04-27 15:15:43 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-27 22:30:46 +0000
commitba817506edcb26e0acf497111e7684e39dadaf04 (patch)
treebcf6984879176d59e088ec6317e0c5a7a19c0330
parent5628fd71197c0d476a89cf3a00810aaf9fdfc086 (diff)
downloadpdfium-ba817506edcb26e0acf497111e7684e39dadaf04.tar.xz
Zero 4 byte variable before reading 3 bytes into it
Otherwise, the top byte will be unitialized. We later mask it off, but MSAN isn't clever enough to realize this. Bug: 716207 Change-Id: Ic4513bbaee6a47654392580d5f404195da4a6509 Reviewed-on: https://pdfium-review.googlesource.com/4591 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
-rw-r--r--core/fxcrt/cfx_seekablestreamproxy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fxcrt/cfx_seekablestreamproxy.cpp b/core/fxcrt/cfx_seekablestreamproxy.cpp
index 622f56b3ec..37dbed1fca 100644
--- a/core/fxcrt/cfx_seekablestreamproxy.cpp
+++ b/core/fxcrt/cfx_seekablestreamproxy.cpp
@@ -164,7 +164,7 @@ CFX_SeekableStreamProxy::CFX_SeekableStreamProxy(
FX_FILESIZE iPosition = GetPosition();
Seek(CFX_SeekableStreamProxy::Pos::Begin, 0);
- uint32_t bom;
+ uint32_t bom = 0;
ReadData(reinterpret_cast<uint8_t*>(&bom), 3);
bom &= BOM_MASK;