Chip M - 2014-11-18

Around line 961 of TdsData looks like this:

len = in.readShort();
if (len != -1) {
return in.readNonUnicodeString(len,
ci.charsetInfo == null ? connection.getCharsetInfo() : ci.charsetInfo);
}

Clearly you are getting a len of -12032, which is then causing the string bounds exception.

My suggestion would be that the criteria to read the string ought to be changed to:

if (len >= 0) {
...
}

because any negative number is ultimately going to result in the string bounds exception anyway. Better to just have this call fall through and return null. My guess on the cause is the abrupt TCP close, as you mentioned, generating some partial data.