File poppler-CVE-2024-4141.patch of Package poppler.36852
iff --git a/FoFiType1.cc b/FoFiType1.cc
index 87278e7..66b1932 100644
Index: poppler-23.01.0/fofi/FoFiType1.cc
===================================================================
--- poppler-23.01.0.orig/fofi/FoFiType1.cc
+++ poppler-23.01.0/fofi/FoFiType1.cc
@@ -202,7 +202,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;
@@ -299,7 +300,7 @@ void FoFiType1::parse()
for (p2 = p; *p2 && *p2 != ' ' && *p2 != '\t'; ++p2) {
;
}
- if (code >= 0 && code < 256) {
+ if (code < 256) {
c = *p2;
*p2 = '\0';
gfree(encoding[code]);