소스 검색

Throw exception on null/placeholder arrays in TNEF

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1877044 13f79535-47bb-0310-9956-ffa450edef68
tags/before_ooxml_3rd_edition
Andreas Beeker 4 년 전
부모
커밋
23acaff78d
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5
    0
      src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIAttribute.java

+ 5
- 0
src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIAttribute.java 파일 보기

@@ -166,6 +166,11 @@ public class MAPIAttribute {
if(isMV || isVL) {
values = LittleEndian.readInt(inp);
}

if (type == Types.NULL && values > 1) {
throw new IOException("Placeholder/NULL arrays aren't supported.");
}

for(int j=0; j<values; j++) {
int len = getLength(type, inp);
byte[] data = IOUtils.safelyAllocate(len, MAX_RECORD_LENGTH);

Loading…
취소
저장