pcb

DrawShortestRats can call CreateNewRat with invalid argument

Bug #699420 reported by ssj20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcb
Fix Released
Medium
Unassigned

Bug Description

This crash occurs in rats.c, around line 610 in the function DrawShortestRats() where CreateNewRat() is called with some arguments which don't exist.

It occurred for me when I tried to "optimize rats nest" on an invalid design.

There's no check in DrawShortestRats() that the firstposition and secondposition pointers are not NULL.
firstposition->X (and Y) and secondposition->X (and Y) are passed as arguments to CreateNewRat(). It is possible in some cases that firstposition and secondposition are not reset from 0 in the code preceding the call to CreateNewRat(). In these cases a segfault will occur.

Tags: sf-patches
Revision history for this message
ssj20 (ssj20) wrote :
Revision history for this message
DJ Delorie (djdelorie) wrote :

moving to the patch tracker

Revision history for this message
DJ Delorie (djdelorie) wrote :

Patch applied. Thanks!

Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

Commited on 2010-12-11 by DJ: can't be "fix released".

Changed in pcb:
status: Fix Released → Fix Committed
Peter Clifton (pcjc2)
Changed in pcb:
milestone: future-bug-release → next-bug-release
Peter Clifton (pcjc2)
Changed in pcb:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.