Menu

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

closed-fixed
None
5
2005-04-07
2005-04-04
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

  • Jens Wilhelm Wulf

    Logged In: YES
    user_id=147285

    Thanks for the patch!

     
  • Jens Wilhelm Wulf

    Logged In: YES
    user_id=147285

    Thanks for the patch!

     
  • Jan Reucker

    Jan Reucker - 2005-04-05
    • assigned_to: nobody --> jwwulf
     
  • Jens Wilhelm Wulf

    Logged In: YES
    user_id=147285

    I used the patch...

     
  • Jens Wilhelm Wulf

    • status: open --> closed-fixed
     

Log in to post a comment.