deri pushed a commit to branch master
in repository groff.
commit e44c44844d26e888e50fa48cd2b0ab23eff94478
Author: Deri James <[email protected]>
AuthorDate: Tue Oct 13 14:16:01 2026 +0100
[gropdf] Correctly handle multi-line hexstring.
* src/devices/gropdf/gropdf.pl (ParsePDFHexString):
Concatenate hex strings on multiple lines.
Fixes <https://savannah.gnu.org/bugs/index.php?68771>.
---
ChangeLog | 9 +++++++++
src/devices/gropdf/gropdf.pl | 22 ++++++++++++++++++++++
2 files changed, 31 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 3f9207572..331c27782 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2026-10-13 Deri James <[email protected]>
+
+ [gropdf] Correctly handle multi-line hexstring.
+
+ * src/devices/gropdf/gropdf.pl (ParsePDFHexString):
+ Concatenate hex strings on multiple lines.
+
+ Fixes <https://savannah.gnu.org/bugs/index.php?68771>.
+
2026-10-12 Deri James <[email protected]>
[pdfmom]: Fix typo.
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 810e85ac0..a410a156d 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -3195,6 +3195,28 @@ sub ParsePDFHexString
unshift(@{$pdfwds},$2) if defined($2) and length($2);
$rtn=$1;
}
+ else
+ {
+ $rtn=$wd;
+ $wd=nextwd($pdfwds,1);
+
+ while ($wd=~m/^((?:[0-9A-Fa-f]{2})*)$/)
+ {
+ $rtn.=$1;
+ $wd=nextwd($pdfwds,1)
+ }
+
+ if ($wd=~m/^((?:[0-9A-Fa-f]{2})*>)(.*)$/)
+ {
+ unshift(@{$pdfwds},$2) if defined($2) and length($2);
+ $rtn.=$1;
+ }
+ else
+ {
+ Die("Failed to parse HexString");
+ }
+ $rtn.=$1;
+ }
return($rtn);
}
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit