Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37551460
en ru br
Репозитории ALT
S:4.04-alt1
5.1: 3.02-alt7
4.1: 3.02-alt4.M41.1
4.0: 3.02-alt3
3.0: 3.00-alt5pl3
+backports:3.01-alt0.M30.2
www.altlinux.org/Changes

Группа :: Офис
Пакет: xpdf

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: xpdf-3.03-crash.patch
Скачать


diff -up xpdf-3.03/fofi/FoFiType1.cc.crash xpdf-3.03/fofi/FoFiType1.cc
--- xpdf-3.03/fofi/FoFiType1.cc.crash	2011-08-15 17:08:53.000000000 -0400
+++ xpdf-3.03/fofi/FoFiType1.cc	2011-08-22 13:44:32.936859153 -0400
@@ -268,9 +268,14 @@ void FoFiType1::parse() {
 	    }
 	  }
 	} else {
-	  if (strtok(buf, " \t") &&
-	      (p = strtok(NULL, " \t\n\r")) && !strcmp(p, "def")) {
-	    break;
+	  p = strtok(buf, " \t\n\r");
+	  if (p)
+	  {
+	    if (!strcmp(p, "def")) break;
+	    if (!strcmp(p, "readonly")) break;
+	    // the spec does not says this but i'm mantaining old xpdf behaviour that accepts "foo def" as end of the encoding array
+	    p = strtok(buf, " \t\n\r");
+	    if (p && !strcmp(p, "def")) break;
 	  }
 	}
       }
diff -up xpdf-3.03/splash/Splash.cc.crash xpdf-3.03/splash/Splash.cc
--- xpdf-3.03/splash/Splash.cc.crash	2011-08-15 17:08:53.000000000 -0400
+++ xpdf-3.03/splash/Splash.cc	2011-08-22 13:46:54.295231194 -0400
@@ -2053,6 +2053,11 @@ SplashError Splash::fillWithPattern(Spla
     xPath->aaScale();
   }
   xPath->sort();
+  if (!&xPath->segs[0])
+  {
+    delete xPath;
+    return splashErrEmptyPath;
+  }
   yMinI = state->clip->getYMinI();
   yMaxI = state->clip->getYMaxI();
   if (vectorAntialias && !inShading) {
@@ -2194,6 +2199,11 @@ SplashError Splash::xorFill(SplashPath *
   }
   xPath = new SplashXPath(path, state->matrix, state->flatness, gTrue);
   xPath->sort();
+  if (!&xPath->segs[0])
+  {
+    delete xPath;
+    return splashErrEmptyPath;
+  }
   scanner = new SplashXPathScanner(xPath, eo, state->clip->getYMinI(),
 				   state->clip->getYMaxI());
 
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin