by Edward-san » Sat May 11, 2013 5:41 am
After 'weapon' is initialized, in line 1396 it's checked if it's NULL or not:
Code: Select all
if ((flags & CPF_USEAMMO) && linetarget && weapon)
If weapon is NULL, it seems it's still possible to do a NULL dereference when linetarget is not NULL, in line 1412:
Code: Select all
S_Sound (self, CHAN_WEAPON, weapon->AttackSound, 1, ATTN_NORM);
After 'weapon' is initialized, in line 1396 it's checked if it's NULL or not:
[code]
if ((flags & CPF_USEAMMO) && linetarget && weapon)
[/code]
If weapon is NULL, it seems it's still possible to do a NULL dereference when linetarget is not NULL, in line 1412:
[code]
S_Sound (self, CHAN_WEAPON, weapon->AttackSound, 1, ATTN_NORM);
[/code]