Menu

#6 Invalidate WriteAccessUser Header

open
nobody
None
5
2010-02-12
2010-02-12
Anonymous
No

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.

Discussion


Log in to post a comment.