Page 1 of 1

[????-4252]NULL deref. in A_CustomPunch code

Posted: Sat May 11, 2013 5:41 am
by Edward-san
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);

Re: [????-4252]NULL deref. in A_CustomPunch code

Posted: Sun May 12, 2013 12:31 pm
by randi
Fixed in r4255.