When trying to tell if a PPT file is encrypted or not, try to avoid an AIOOB
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@568949 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1998bb30a5
commit
ac3c57b0d8
@ -91,10 +91,15 @@ public class EncryptedSlideShow
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Grab the details of the UserEditAtom there
|
// Grab the details of the UserEditAtom there
|
||||||
Record r = Record.buildRecordAtOffset(
|
// If the record's messed up, we could AIOOB
|
||||||
hss.getUnderlyingBytes(),
|
Record r = null;
|
||||||
(int)cua.getCurrentEditOffset()
|
try {
|
||||||
);
|
r = Record.buildRecordAtOffset(
|
||||||
|
hss.getUnderlyingBytes(),
|
||||||
|
(int)cua.getCurrentEditOffset()
|
||||||
|
);
|
||||||
|
} catch(ArrayIndexOutOfBoundsException e) {}
|
||||||
|
if(r == null) { return null; }
|
||||||
if(! (r instanceof UserEditAtom)) { return null; }
|
if(! (r instanceof UserEditAtom)) { return null; }
|
||||||
UserEditAtom uea = (UserEditAtom)r;
|
UserEditAtom uea = (UserEditAtom)r;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user