File poppler-CVE-2024-4141.patch of Package poppler.34111
iff --git a/FoFiType1.cc b/FoFiType1.cc
index 87278e7..66b1932 100644
Index: poppler-0.24.4/fofi/FoFiType1.cc
===================================================================
--- poppler-0.24.4.orig/fofi/FoFiType1.cc
+++ poppler-0.24.4/fofi/FoFiType1.cc
@@ -211,7 +211,8 @@ void FoFiType1::parse() {
char *line, *line1, *p, *p2;
char buf[256];
char c;
- int n, code, base, i, j;
+ unsigned int code;
+ int n, base, i, j;
char *tokptr;
GBool gotMatrix;
@@ -276,7 +277,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';
encoding[code] = copyString(p);