View | Details | Raw Unified | Return to bug 137156
Collapse All | Expand All

(-)xpdf/JBIG2Stream.cc (+6 lines)
Lines 7-12 Link Here
7
//========================================================================
7
//========================================================================
8
8
9
#include <aconf.h>
9
#include <aconf.h>
10
#include <limits.h>
10
11
11
#ifdef USE_GCC_PRAGMAS
12
#ifdef USE_GCC_PRAGMAS
12
#pragma implementation
13
#pragma implementation
Lines 2305-2310 void JBIG2Stream::readHalftoneRegionSeg( Link Here
2305
    error(getPos(), "Bad symbol dictionary reference in JBIG2 halftone segment");
2306
    error(getPos(), "Bad symbol dictionary reference in JBIG2 halftone segment");
2306
    return;
2307
    return;
2307
  }
2308
  }
2309
  if ( gridW < 0 || gridH < 0 || gridW >= INT_MAX / gridH || gridH >= INT_MAX / gridW) {
2310
    error(getPos(), "Bad size in JBIG2 halftone segment");
2311
    return;
2312
  }
2313
2308
  patternDict = (JBIG2PatternDict *)seg;
2314
  patternDict = (JBIG2PatternDict *)seg;
2309
  bpp = 0;
2315
  bpp = 0;
2310
  i = 1;
2316
  i = 1;
(-)xpdf/Stream.cc (-3 / +3 lines)
Lines 1277-1283 CCITTFaxStream::CCITTFaxStream(Stream *s Link Here
1277
  endOfLine = endOfLineA;
1277
  endOfLine = endOfLineA;
1278
  byteAlign = byteAlignA;
1278
  byteAlign = byteAlignA;
1279
  columns = columnsA;
1279
  columns = columnsA;
1280
  if (columns < 1) {
1280
  if (columns + 3 < 1 || columns + 4 < 1 || columns < 1) {
1281
    columns = 1;
1281
    columns = 1;
1282
  }
1282
  }
1283
  rows = rowsA;
1283
  rows = rowsA;
Lines 3066-3077 GBool DCTStream::readHuffmanTables() { Link Here
3066
  while (length > 0) {
3066
  while (length > 0) {
3067
    index = str->getChar();
3067
    index = str->getChar();
3068
    --length;
3068
    --length;
3069
    if ((index & 0x0f) >= 4) {
3069
    if ((index & ~0x10) >= 4 || (index & ~0x10) < 0) {
3070
      error(getPos(), "Bad DCT Huffman table");
3070
      error(getPos(), "Bad DCT Huffman table");
3071
      return gFalse;
3071
      return gFalse;
3072
    }
3072
    }
3073
    if (index & 0x10) {
3073
    if (index & 0x10) {
3074
      index &= 0x0f;
3074
      index &= 0x03;
3075
      if (index >= numACHuffTables)
3075
      if (index >= numACHuffTables)
3076
	numACHuffTables = index+1;
3076
	numACHuffTables = index+1;
3077
      tbl = &acHuffTables[index];
3077
      tbl = &acHuffTables[index];

Return to bug 137156