Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 168177 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-8 / +7 lines)
Line  Link Here
0
-- libs/xpdf/xpdf/Stream.cc
0
++ libs/xpdf/xpdf/Stream.cc
Lines 414-428 Link Here
414
414
415
  nVals = width * nComps;
415
  nVals = width * nComps;
416
  totalBits = nVals * nBits;
416
  totalBits = nVals * nBits;
417
  if (width <= 0 || nComps <= 0 || nBits <= 0 ||
418
      nComps >= INT_MAX / nBits ||
419
      width >= INT_MAX / nComps / nBits ||
420
      nVals * nBits + 7 < 0) {
421
    return;
422
  }
423
  pixBytes = (nComps * nBits + 7) >> 3;
417
  pixBytes = (nComps * nBits + 7) >> 3;
424
  rowBytes = ((totalBits + 7) >> 3) + pixBytes;
418
  rowBytes = ((totalBits + 7) >> 3) + pixBytes;
425
  if (rowBytes < 0) {
419
  if (width <= 0 || nComps <= 0 || nBits <= 0 ||
420
      nComps > gfxColorMaxComps ||
421
      nBits > 16 ||
422
      nVals <= 0 ||
423
      nVals * nBits + 7 <= 0 ||
424
      rowBytes <= 0) {
426
    return;
425
    return;
427
  }
426
  }
428
  predLine = (Guchar *)gmalloc(rowBytes);
427
  predLine = (Guchar *)gmalloc(rowBytes);

Return to bug 168177