Skip to content

Commit 8c92657

Browse files
author
gefeili
committed
Fix the issue that casting the result of read4OctetLength to long.
1 parent c8b32f4 commit 8c92657

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pg/src/main/java/org/bouncycastle/bcpg/PublicKeyPacket.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public class PublicKeyPacket
136136
throw new UnsupportedPacketVersionException("Unsupported Public Key Packet version encountered: " + version);
137137
}
138138

139-
time = StreamUtil.read4OctetLength(in);
139+
time = StreamUtil.read4OctetLength(in) & 0xFFFFFFFFL;
140140

141141
if (version == 2 || version == VERSION_3)
142142
{

0 commit comments

Comments
 (0)