Anonymous | Login | 2024-04-27 00:59 CEST |
Main | My View | View Issues | Change Log | Wiki | Tavern | News |
Viewing Issue Simple Details [ Jump to Notes ] [ Wiki ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||||||
0008416 | [DCSS] Patches | minor | have not tried | 2014-04-23 03:57 | 2014-04-24 00:22 | ||||||||
Reporter | floatingatoll | View Status | public | ||||||||||
Assigned To | neil | ||||||||||||
Priority | normal | Resolution | done | ||||||||||
Status | resolved | Product Branch | 0.15 ancient branch | ||||||||||
Summary | 0008416: ouch.cc: add argument checks for function check_your_resists() | ||||||||||||
Description |
ouch.cc function check_your_resists requires a valid 'bolt *beam' when doEffects is true, but does not validate this assumption. The function itself has two purposes, based on the doEffects value; when false, it calculates an effect; when true, it also applies an effect. In most cases, applying the effect appears not to require a valid *beam, and everything is fine. However, the effect BEAM_POISON_ARROW requires a valid *beam as its calculations depend on the damage.num and damage.size properties. So the attached patch validates that, when doEffect is true, a valid *beam was provided, before trying to dereference it and crashing. I wasn't able to find any instances of code mis-using this function, either under check_your_resists() or player::beam_resists(), but I'm not familiar with this. |
||||||||||||
Additional Information | |||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files |
beam_assert_2.patch [^] (811 bytes) 2014-04-23 04:04 [Show Content]
beam_assert_3.patch [^] (1,266 bytes) 2014-04-23 23:07 [Show Content] |
||||||||||||
|
Mantis 1.1.8[^] Copyright © 2000 - 2009 Mantis Group |