[DebianGIS-dev] Bug#439732: gosmore aborts after doing a couple of routes
Petter Reinholdtsen
pere at hungry.com
Thu Aug 30 12:36:31 UTC 2007
I got this suggestion from upstream. Can you test and see if it help
to get rid of the valgrind errors?
[Martijn van Oosterhout]
> Ok, got something: valgrind points at sprintf and gosmore only uses
> that in one place. And that function is indeed slightly dodgy. Some
> suggestions:
>
> if (!i) len += strlen (last);
> else len += sprintf (msg + len, "%s\n", last);
>
> That should probably be strlen(last)+1. Earlier it does a len+=11, I'd
> make that 12 to be on the safe side.
>
> See if that helps,
As I said earlier, I am unable to reproduce the problem.
Happy hacking,
--
Petter Reinholdtsen
More information about the Pkg-grass-devel
mailing list