Invalidate WriteAccessUser Header
Brought to you by:
jxlynch
jxl.read.biff.WriteAccessRecord.java
--------------------
wauser = StringHelper.getUnicodeString(data, 112/2, 0);
--------------------
should be
--------------------
int length = IntegerHelper.getInt(data[0], data[1]);
if (length > 0 && data[2] == 0)
{
wauser = StringHelper.getString(data, length, 3, ws);
}
else if (length > 0)
{
wauser = StringHelper.getUnicodeString(data, length, 3);
}
---------------------
In MS's SPEC, the WriteAccessUser is 112 byte long, but some files will not follow this. And the original code does not check the flag, which may cause incorrect reading.