stack trace for bug #755

Dirk Hohndel dirk at hohndel.org
Tue Nov 11 12:01:05 PST 2014


On Tue, Nov 11, 2014 at 09:46:19PM +0200, Lubomir I. Ivanov wrote:
> >>
> >> And the line calling strdup (in case my sources are slightly off sync):
> >>
> >>         if (!same_string(displayedTrip.location, currentTrip->location)) {
> >>                 currentTrip->location = strdup(displayedTrip.location);
> >>                 mark_divelist_changed(true);
> >>         }
> >
> > That "strdup()" really should be "copy_string()".

Yes, whenever there's a possibility that the argument is NULL we really
should use copy_string(). That's why we have it.

> here is a patch for that.
> no crash occurs on win32, yet i can see NULL values reaching the
> same_string() checks.

Thanks. I wonder if the infinite loop you are observing is also dependent
on differen libc implementations... I don't see anything obvious that
stands out, though...

/D


More information about the subsurface mailing list