mirror of https://github.com/apache/poi.git
Avoid stackoverflow exception that can be caused by a corrupted slideshow file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897318 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
53599d84a7
commit
8f1c84c3fa
|
@ -55,6 +55,9 @@ public abstract class AbstractEscherOptRecord extends EscherRecord {
|
|||
EscherRecordFactory recordFactory )
|
||||
{
|
||||
int bytesRemaining = readHeader( data, offset );
|
||||
if (bytesRemaining < 0) {
|
||||
throw new IllegalStateException("Invalid value for bytesRemaining: " + bytesRemaining);
|
||||
}
|
||||
short propertiesCount = readInstance( data, offset );
|
||||
int pos = offset + 8;
|
||||
|
||||
|
|
Loading…
Reference in New Issue