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

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 a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [????-4252]NULL deref. in A_CustomPunch code

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

by randi » Sun May 12, 2013 12:31 pm

Fixed in r4255.

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

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);

Top