mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2025-01-03 10:29:19 +00:00
Protect ourselves from taking null pointer exceptions from corrupted AppleWorks files.
This commit is contained in:
parent
5adb646e11
commit
0f7f950eaa
@ -197,7 +197,7 @@ public class AppleWorksWordProcessorFileFilter implements FileFilter {
|
||||
int byte3 = AppleUtil.getUnsignedByte(fileData[offset++]);
|
||||
boolean addReturn = (byte3 >= 0x80);
|
||||
int length = (byte3 & 0x7f);
|
||||
while (length > 0) {
|
||||
while ((length > 0) && (offset < fileData.length)) {
|
||||
byte ch = fileData[offset++];
|
||||
length--;
|
||||
if (ch < 0x20) { // special formatting character
|
||||
|
Loading…
Reference in New Issue
Block a user