From ba817506edcb26e0acf497111e7684e39dadaf04 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 27 Apr 2017 15:15:43 -0700 Subject: 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 Commit-Queue: Tom Sepez --- core/fxcrt/cfx_seekablestreamproxy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fxcrt') 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(&bom), 3); bom &= BOM_MASK; -- cgit v1.2.3