Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0008415 [DCSS] Patches minor have not tried 2014-04-23 03:46 2014-04-23 06:25
Reporter floatingatoll View Status public  
Assigned To neil
Priority normal Resolution done  
Status resolved   Product Branch 0.15 ancient branch
Summary 0008415: dgn-height.cc: avoid divide-by-zero in dgn_smooth_height_at() when divisor result is 0
Description In dgn-height.cc function dgn_smooth_height_at runs various calculations on a range of x and y values, based on the provided radius, incrementing a 'divisor' value from its initial state of 0 by various amounts.

With sufficiently unusual inputs, the resulting 'divisor' value could be 0, triggering a divide-by-zero error.

The attached patch handles that cleanly by simply returning without taking action, as given the provided inputs there is no valid x,y combination to use for the divisor.
Additional Information
Tags No tags attached.
Attached Files ? file icon divisor.patch [^] (777 bytes) 2014-04-23 03:46 [Show Content]

- Relationships

-  Notes
(0025893)
neil (administrator)
2014-04-23 06:24

Fixed in trunk (0.15-a0-208-g7a2063a), thanks! I made a slight tweak for readability, and added a comment.

- Issue History
Date Modified Username Field Change
2014-04-23 03:46 floatingatoll New Issue
2014-04-23 03:46 floatingatoll File Added: divisor.patch
2014-04-23 06:24 neil Note Added: 0025893
2014-04-23 06:24 neil Status new => resolved
2014-04-23 06:24 neil Fixed in Branch => 0.15 development branch
2014-04-23 06:24 neil Resolution open => done
2014-04-23 06:24 neil Assigned To => neil


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker