Skip to content

Commit

Permalink
Fixed: Remote vulnerability in Cl_ReadSoundDelta2 due to malformed pa…
Browse files Browse the repository at this point in the history
…ckets. Thanks yagisan.
  • Loading branch information
danij committed May 26, 2009
1 parent 098ccdc commit f44bcaf
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion doomsday/engine/portable/src/cl_sound.c
Expand Up @@ -93,7 +93,15 @@ void Cl_ReadSoundDelta2(deltatype_t type, boolean skip)
uint index = (ushort) Msg_ReadShort();

if(index < numSectors)
sector = SECTOR_PTR(index);
{
sector = SECTOR_PTR(index);
}
else
{
Con_Message("Cl_ReadSoundDelta2: DT_SECTOR_SOUND contains "
"invalid sector num %u. Skipping.\n", index);
skip = true;
}
}
else /* DT_POLY_SOUND */
{
Expand All @@ -104,6 +112,12 @@ void Cl_ReadSoundDelta2(deltatype_t type, boolean skip)
poly = polyObjs[index];
emitter = (mobj_t *) poly;
}
else
{
Con_Message("Cl_ReadSoundDelta2: DT_POLY_SOUND contains "
"invalid polyobj num %u. Skipping.\n", index);
skip = true;
}
}

flags = Msg_ReadByte();
Expand Down

0 comments on commit f44bcaf

Please sign in to comment.