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

Collapse All | Expand All

(-)kpdf/xpdf/xpdf/SplashOutputDev.cc (-5 / +8 lines)
Lines 621-636 Link Here
621
      }
621
      }
622
      break;
622
      break;
623
    case fontTrueType:
623
    case fontTrueType:
624
      if (!(ff = FoFiTrueType::load(fileName->getCString()))) {
624
      if ((ff = FoFiTrueType::load(fileName->getCString()))) {
625
	goto err2;
625
	codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
626
	n = 256;
627
	delete ff;
628
      } else {
629
	codeToGID = NULL;
630
	n = 0;
626
      }
631
      }
627
      codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
628
      delete ff;
629
      if (!(fontFile = fontEngine->loadTrueTypeFont(
632
      if (!(fontFile = fontEngine->loadTrueTypeFont(
630
			   id,
633
			   id,
631
			   fileName->getCString(),
634
			   fileName->getCString(),
632
			   fileName == tmpFileName,
635
			   fileName == tmpFileName,
633
			   codeToGID, 256))) {
636
			   codeToGID, n))) {
634
	error(-1, "Couldn't create a font for '%s'",
637
	error(-1, "Couldn't create a font for '%s'",
635
	      gfxFont->getName() ? gfxFont->getName()->getCString()
638
	      gfxFont->getName() ? gfxFont->getName()->getCString()
636
	                         : "(unnamed)");
639
	                         : "(unnamed)");
(-)kpdf/xpdf/fofi/FoFiTrueType.cc (+21 lines)
Lines 1343-1348 Link Here
1343
    return;
1343
    return;
1344
  }
1344
  }
1345
1345
1346
  // make sure the loca table is sane (correct length and entries are
1347
  // in bounds)
1348
  i = seekTable("loca");
1349
  if (tables[i].len < (nGlyphs + 1) * (locaFmt ? 4 : 2)) {
1350
    parsedOk = gFalse;
1351
    return;
1352
  }
1353
  for (j = 0; j <= nGlyphs; ++j) {
1354
    if (locaFmt) {
1355
      pos = (int)getU32BE(tables[i].offset + j*4, &parsedOk);
1356
    } else {
1357
      pos = getU16BE(tables[i].offset + j*2, &parsedOk);
1358
    }
1359
    if (pos < 0 || pos > len) {
1360
      parsedOk = gFalse;
1361
    }
1362
  }
1363
  if (!parsedOk) {
1364
    return;
1365
  }
1366
1346
  // read the post table
1367
  // read the post table
1347
  readPostTable();
1368
  readPostTable();
1348
  if (!parsedOk) {
1369
  if (!parsedOk) {

Return to bug 100263