[Xastir] dbfawk bug?
Curt, WE7U
archer at eskimo.com
Tue Jan 25 16:00:22 EST 2005
On Tue, 25 Jan 2005, Tom Russo wrote:
> I think I see what the problem is. When building the datastructure that
> contains dbfawk signatures, dbfawk_load_sigs mallocs space for a new list entry
> and links it into the linked list, *then* tries to parse the dbfawk file
> and populate the structure. As far as I can tell, if the
> "awk_compile_program" call fails it doesn't unlink and free the useless,
> incomplete list element. The segfault is probably happening later on when
> walking through the list of dbfawk signatures to find a match. Worse, it's
> probably happening because your broken, unparsable dbfawk file probably has
> the correct signature to match with a shapefile you want to display, and is
> appearing earlier in the list than the good one (because of the ".#" prefix).
> So its entry gets pulled out and draw_shapefile_map tries to run its
> (null) dbfawk program. Bickety bam, you get a segfault.
>
> I don't have a quick fix, but it seems the correct fix is to change
> dbfawk_load_sigs so it mallocs and populates the list entry completely
> before it links to the list, and only link it in if it's possible to
> complete the operation. If it's not good it should be freed instead, and
> nobody's the wiser. Definitely add it to the bug list. I will try to fix
> it as soon as I can.
How about as a quick fix before that: Ignore any files starting
with '.'
It should be fast to add an exception for hidden files.
Implement the other fix as you find time.
--
Curt, WE7U. APRS Client Comparisons: http://www.eskimo.com/~archer
"Lotto: A tax on people who are bad at math." -- unknown
"Windows: Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me: I picked the coordinate system!"
More information about the Xastir
mailing list