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

iff --git a/FoFiType1.cc b/FoFiType1.cc
index 87278e7..66b1932 100644
Index: poppler-22.01.0/fofi/FoFiType1.cc
===================================================================
--- poppler-22.01.0.orig/fofi/FoFiType1.cc
+++ poppler-22.01.0/fofi/FoFiType1.cc
@@ -210,7 +210,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;
 
@@ -295,7 +296,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