diff options
author | Albert Astals Cid <aacid@kde.org> | 2013-01-09 22:17:09 +0100 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2013-01-09 22:17:29 +0100 |
commit | b1026b5978c385328f2a15a2185c599a563edf91 (patch) | |
tree | a053e85451c094e8e900278aa2cc2ec0b35a330c | |
parent | bef2c42f381c74fdb8bbb43babe1a93a0e229fb0 (diff) |
Initialize refLine totally
Fixes uninitialized memory read in 1004.pdf.asan.7.3
-rw-r--r-- | poppler/Stream.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/poppler/Stream.cc b/poppler/Stream.cc index 414ff3fe..d118dddf 100644 --- a/poppler/Stream.cc +++ b/poppler/Stream.cc @@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com> // Copyright (C) 2008 Julien Rebetez <julien@fhtagn.net> // Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org> @@ -1712,8 +1712,9 @@ int CCITTFaxStream::lookChar() { for (i = 0; i < columns && codingLine[i] < columns; ++i) { refLine[i] = codingLine[i]; } - refLine[i++] = columns; - refLine[i] = columns; + for (; i < columns + 2; ++i) { + refLine[i] = columns; + } codingLine[0] = 0; a0i = 0; b1i = 0; |