--- a/jdk/src/share/classes/com/sun/security/ntlm/Client.java Sat Feb 09 16:43:49 2013 +0800
+++ b/jdk/src/share/classes/com/sun/security/ntlm/Client.java Sat Feb 09 16:43:58 2013 +0800
@@ -138,8 +138,7 @@
domain = domainFromServer;
}
if (domain == null) {
- throw new NTLMException(NTLMException.NO_DOMAIN_INFO,
- "No domain info");
+ domain = "";
}
int flags = 0x88200 | (inputFlags & 3);
--- a/jdk/src/share/classes/com/sun/security/ntlm/NTLM.java Sat Feb 09 16:43:49 2013 +0800
+++ b/jdk/src/share/classes/com/sun/security/ntlm/NTLM.java Sat Feb 09 16:43:58 2013 +0800
@@ -136,10 +136,10 @@
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 @@
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");