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;
|
domain = domainFromServer;
|
||||||
}
|
}
|
||||||
if (domain == null) {
|
if (domain == null) {
|
||||||
throw new NTLMException(NTLMException.NO_DOMAIN_INFO,
|
domain = "";
|
||||||
"No domain info");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int flags = 0x88200 | (inputFlags & 3);
|
int flags = 0x88200 | (inputFlags & 3);
|
||||||
|
@ -136,10 +136,10 @@ class NTLM {
|
|||||||
|
|
||||||
int readInt(int offset) throws NTLMException {
|
int readInt(int offset) throws NTLMException {
|
||||||
try {
|
try {
|
||||||
return internal[offset] & 0xff +
|
return (internal[offset] & 0xff) +
|
||||||
(internal[offset+1] & 0xff << 8) +
|
((internal[offset+1] & 0xff) << 8) +
|
||||||
(internal[offset+2] & 0xff << 16) +
|
((internal[offset+2] & 0xff) << 16) +
|
||||||
(internal[offset+3] & 0xff << 24);
|
((internal[offset+3] & 0xff) << 24);
|
||||||
} catch (ArrayIndexOutOfBoundsException ex) {
|
} catch (ArrayIndexOutOfBoundsException ex) {
|
||||||
throw new NTLMException(NTLMException.PACKET_READ_ERROR,
|
throw new NTLMException(NTLMException.PACKET_READ_ERROR,
|
||||||
"Input message incorrect size");
|
"Input message incorrect size");
|
||||||
@ -148,8 +148,8 @@ class NTLM {
|
|||||||
|
|
||||||
int readShort(int offset) throws NTLMException {
|
int readShort(int offset) throws NTLMException {
|
||||||
try {
|
try {
|
||||||
return internal[offset] & 0xff +
|
return (internal[offset] & 0xff) +
|
||||||
(internal[offset+1] & 0xff << 8);
|
((internal[offset+1] & 0xff << 8));
|
||||||
} catch (ArrayIndexOutOfBoundsException ex) {
|
} catch (ArrayIndexOutOfBoundsException ex) {
|
||||||
throw new NTLMException(NTLMException.PACKET_READ_ERROR,
|
throw new NTLMException(NTLMException.PACKET_READ_ERROR,
|
||||||
"Input message incorrect size");
|
"Input message incorrect size");
|
||||||
|
Loading…
Reference in New Issue
Block a user