Skip to content

Commit 3146710

Browse files
Satyen SubramaniamPaul Hohensee
authored andcommitted
8323562: SaslInputStream.read() may return wrong value
Backport-of: 5cf7947ccd1fc56e8944c28145a9c8e71f5e1a03
1 parent 3660c07 commit 3146710

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/java.naming/share/classes/com/sun/jndi/ldap/sasl/SaslInputStream.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -78,7 +78,7 @@ public int read() throws IOException {
7878
byte[] inBuf = new byte[1];
7979
int count = read(inBuf, 0, 1);
8080
if (count > 0) {
81-
return inBuf[0];
81+
return inBuf[0] & 0xff;
8282
} else {
8383
return -1;
8484
}

0 commit comments

Comments
 (0)