Skip to content

Commit

Permalink
Fixed (Engine): Crash with zero-length sound lumps e.g., dakills.wad …
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Nov 27, 2009
1 parent 8af8ce9 commit 21494d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doomsday/engine/portable/src/s_cache.c
Expand Up @@ -601,6 +601,9 @@ static sfxsample_t* cacheSample(int id, sfxinfo_t* info)
return NULL;
}

if(W_LumpLength(info->lumpNum) <= 8)
return NULL;

W_ReadLumpSection(info->lumpNum, hdr, 0, 12);

// Is this perhaps a WAV sound?
Expand Down

0 comments on commit 21494d7

Please sign in to comment.