crash fix for broken files

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6811 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper
2004-02-29 18:46:50 +00:00
parent fd8c0a5cca
commit e4e48cc279
3 changed files with 13 additions and 0 deletions
@@ -142,6 +142,11 @@ OpenDMLParser::Parse(BPositionIO *source)
}
pos += 4;
size = AVI_UINT32(temp);
if (size == 0) {
TRACE("OpenDMLParser::Parse: Error: chunk of size 0 found\n");
goto err;
}
if (fourcc == FOURCC('J','U','N','K')) {
TRACE("OpenDMLParser::Parse: JUNK chunk ignored, size: %lu bytes\n", size);