commit fa477b154b7031d165ddce058d541b56c822aae6 Author: David Benjamin Date: Sun Jun 7 23:35:40 2009 -0400 Fill codingLine with w for safety Fixes crash in #12014. diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc index 57ec42b..56a6490 100644 --- a/poppler/JBIG2Stream.cc +++ b/poppler/JBIG2Stream.cc @@ -2777,7 +2777,10 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h, // ---> max refLine size = w + 2 codingLine = (int *)gmallocn(w + 1, sizeof(int)); refLine = (int *)gmallocn(w + 2, sizeof(int)); - codingLine[0] = w; + // fill codingLine with w for safety + for (i = 0; i < w+1; ++i) { + codingLine[i] = w; + } for (y = 0; y < h; ++y) {