This is an automated email from the ASF dual-hosted git repository.

tilman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pdfbox-jbig2.git


The following commit(s) were added to refs/heads/master by this push:
     new e257f03  PDFBOX-6152: read byte unsigned
e257f03 is described below

commit e257f03075a0a6ef9aaa75526a16c1dd97677a38
Author: Tilman Hausherr <[email protected]>
AuthorDate: Sun Jan 25 13:59:36 2026 +0100

    PDFBOX-6152: read byte unsigned
---
 src/main/java/org/apache/pdfbox/jbig2/segments/PatternDictionary.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/src/main/java/org/apache/pdfbox/jbig2/segments/PatternDictionary.java 
b/src/main/java/org/apache/pdfbox/jbig2/segments/PatternDictionary.java
index a4261e9..eb16914 100644
--- a/src/main/java/org/apache/pdfbox/jbig2/segments/PatternDictionary.java
+++ b/src/main/java/org/apache/pdfbox/jbig2/segments/PatternDictionary.java
@@ -103,8 +103,8 @@ public class PatternDictionary implements Dictionary
 
     private void readPatternWidthAndHeight() throws IOException
     {
-        hdpWidth = subInputStream.readByte();
-        hdpHeight = subInputStream.readByte();
+        hdpWidth = (short) (subInputStream.readByte() & 0xFF);
+        hdpHeight = (short) (subInputStream.readByte() & 0xFF);
     }
 
     private void readGrayMax() throws IOException

Reply via email to