File poppler-CVE-2024-4141.patch of Package poppler.36857

iff --git a/FoFiType1.cc b/FoFiType1.cc
index 87278e7..66b1932 100644
Index: poppler-0.79.0/fofi/FoFiType1.cc
===================================================================
--- poppler-0.79.0.orig/fofi/FoFiType1.cc
+++ poppler-0.79.0/fofi/FoFiType1.cc
@@ -212,7 +212,8 @@ void FoFiType1::parse() {
   char *line, *line1, *firstLine, *p, *p2;
   char buf[256];
   char c;
-  int n, code, base, i, j;
+  unsigned int code;
+  int n, base, i, j;
   char *tokptr;
   bool gotMatrix, continueLine;
 
@@ -304,7 +305,7 @@ void FoFiType1::parse() {
 	    }
 	    ++p;
 	    for (p2 = p; *p2 && *p2 != ' ' && *p2 != '\t'; ++p2) ;
-	    if (code >= 0 && code < 256) {
+	    if (code < 256) {
 	      c = *p2;
 	      *p2 = '\0';
 	      gfree(encoding[code]);
openSUSE Build Service is sponsored by