8007761: NTLM coding errors
Reviewed-by: chegar
This commit is contained in:
parent
d8233ec657
commit
76953b4d1e
@ -138,8 +138,7 @@ public final class Client extends NTLM {
|
||||
domain = domainFromServer;
|
||||
}
|
||||
if (domain == null) {
|
||||
throw new NTLMException(NTLMException.NO_DOMAIN_INFO,
|
||||
"No domain info");
|
||||
domain = "";
|
||||
}
|
||||
|
||||
int flags = 0x88200 | (inputFlags & 3);
|
||||
|
@ -136,10 +136,10 @@ class NTLM {
|
||||
|
||||
int readInt(int offset) throws NTLMException {
|
||||
try {
|
||||
return internal[offset] & 0xff +
|
||||
(internal[offset+1] & 0xff << 8) +
|
||||
(internal[offset+2] & 0xff << 16) +
|
||||
(internal[offset+3] & 0xff << 24);
|
||||
return (internal[offset] & 0xff) +
|
||||
((internal[offset+1] & 0xff) << 8) +
|
||||
((internal[offset+2] & 0xff) << 16) +
|
||||
((internal[offset+3] & 0xff) << 24);
|
||||
} catch (ArrayIndexOutOfBoundsException ex) {
|
||||
throw new NTLMException(NTLMException.PACKET_READ_ERROR,
|
||||
"Input message incorrect size");
|
||||
@ -148,8 +148,8 @@ class NTLM {
|
||||
|
||||
int readShort(int offset) throws NTLMException {
|
||||
try {
|
||||
return internal[offset] & 0xff +
|
||||
(internal[offset+1] & 0xff << 8);
|
||||
return (internal[offset] & 0xff) +
|
||||
((internal[offset+1] & 0xff << 8));
|
||||
} catch (ArrayIndexOutOfBoundsException ex) {
|
||||
throw new NTLMException(NTLMException.PACKET_READ_ERROR,
|
||||
"Input message incorrect size");
|
||||
|
Loading…
Reference in New Issue
Block a user