Re: [Gpsbabel-code] where to look for a limit on number of waypoints?
Brought to you by:
robertl
From: Conrad M. <cs...@gm...> - 2014-04-02 18:14:04
|
val seems to come from the tpo file itself, so either it's corrupt or we don't understand the format exactly... maybe zero is a sentinel value. (gdb) p jj $2 = 17 (gdb) p waypoint_cnt $3 = 19 Anyway, the immediate issue is that we're indexing off the left side of an array... not sure what the right thing to do instead is. Thanks, Conrad On Wed, Apr 2, 2014 at 2:09 PM, Conrad Meyer <cs...@gm...> wrote: > On Wed, Apr 2, 2014 at 1:42 PM, SRE <ste...@cl...> wrote: >> Any idea how to figure this out? I'm happy to poke around in the >> code but could use some help knowing where to start. >> >> http://climber.org/TooManyWaypoints.tpo >> >> Steve > > > Hi Steve, > > Thanks for providing the example inputs. The issue exists in SVN head > (notable because there has been lots of change since 1.4.4): > > $ ./gpsbabel -r -i tpo3 -o gpx -f TooManyWaypoints.tpo -F XXX.gpx ; echo $? > [1] 19831 segmentation fault (core dumped) ./gpsbabel -r -i tpo3 > -o gpx -f TooManyWaypoints.tpo -F XXX.gpx > 139 > > (gdb) bt > #0 Waypoint::Waypoint (this=0x8483b0, other=...) at waypt.cc:623 > #1 0x0000000000496a0d in tpo_process_routes () at tpo.cc:1319 > #2 0x0000000000496add in tpo_read_3_x () at tpo.cc:1368 > #3 0x000000000040a43b in main (argc=10, argv=0x7fffffffdc88) at main.cc:372 > > in tpo_process_routes(): > > 1318 // Duplicate a waypoint from our index of waypoints. > 1319 waypoint_temp = new Waypoint(*tpo_wp_index[val-1]); > > (gdb) p val > $1 = 0 '\000' > > Hm. So that seems clearly wrong.... > > Conrad |