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

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

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

Post 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);
User avatar
randi
Site Admin
Posts: 7750
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

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

Post by randi »

Fixed in r4255.
Post Reply

Return to “Closed Bugs [GZDoom]”