Skip to content

Commit

Permalink
BCPGInputStream.readPacket(): Consistently call read()
Browse files Browse the repository at this point in the history
Fixes #1249
  • Loading branch information
vanitasvitae committed Oct 8, 2022
1 parent 0f2b0ea commit d594ee2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pg/src/main/java/org/bouncycastle/bcpg/BCPGInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,13 @@ public Packet readPacket()
}
else if (l <= 223)
{
int b = in.read();
int b = this.read();

bodyLen = ((l - 192) << 8) + (b) + 192;
}
else if (l == 255)
{
bodyLen = (in.read() << 24) | (in.read() << 16) | (in.read() << 8) | in.read();
bodyLen = (this.read() << 24) | (this.read() << 16) | (this.read() << 8) | this.read();
}
else
{
Expand Down

0 comments on commit d594ee2

Please sign in to comment.