[????-4252]NULL deref. in A_CustomPunch code
Posted: Sat May 11, 2013 5:41 am
After 'weapon' is initialized, in line 1396 it's checked if it's NULL or not:
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
if ((flags & CPF_USEAMMO) && linetarget && weapon)
Code: Select all
S_Sound (self, CHAN_WEAPON, weapon->AttackSound, 1, ATTN_NORM);