Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#3 bounds check error in windfield.cpp:draw_thermal()

closed-fixed
None
5
2005-04-07
2005-04-04
Chris Bayley
No

There is a cut and paste error in the bounds checking
in windfield.cpp:778 that can yield an invalid
'thermal_ptr' and leading to a segfault.
ofending code:
if (xmin < 1)
xmin = 1;
if (xmax > occupancy_grid_size - 2)
xmax = occupancy_grid_size - 2;
if (ymin < 1)
xmin = 1; // should read ymin = 1
if (ymax > occupancy_grid_size - 2)
ymax = occupancy_grid_size - 2;

It segfaulted on me when I was using the audio
interface while unplugged.

Discussion

  • Logged In: YES
    user_id=147285

    Thanks for the patch!

     
  • Logged In: YES
    user_id=147285

    Thanks for the patch!

     
  • Jan Reucker
    Jan Reucker
    2005-04-05

    • assigned_to: nobody --> jwwulf
     
  • Logged In: YES
    user_id=147285

    I used the patch...

     
    • status: open --> closed-fixed