Yo Hal! On Thu, 30 Oct 2025 14:03:13 -0700 Hal Murray <[email protected]> wrote:
> gpsd-3.26.2~dev/gpsmon/monitor_nmea0183.c: In function 'nmea_update':
> gpsd-3.26.2~dev/gpsmon/monitor_nmea0183.c:313:17: warning: array
> subscript -1 is
> outside array bounds of 'char[132]' [-Warray-bounds]
> 313 | *--s_end = '.';
> | ^~~~~~~~
> gpsd-3.26.2~dev/gpsmon/monitor_nmea0183.c:32:13: note: while
> referencing 'senten
> ces'
> 32 | static char sentences[132];
> | ^~~~~~~~~
> plus 2 more for the next to identical lines.
The patch I uploaded did not fix that??
This new test should detect if s_end can be set before the start
of the destination array.
s_end is jsut:
char *s_end = sentences + s_len;
So as long as s_len >= 2, we are good. Now two tests for that.
> Have you seen anything like that?
All the time, but usually the cc is correct.
> Any hints on how to track it down?
Easy. Just test for s_end > (sentences + 3)
> It looks like a bug in the compiler.
I've been fooled before...
> I'm assuming the compiler on the buggy system has been zapped by a
> cosmic ray or whatever. There is a gcc14 package available. I
> installed it, but can't find where it is.
Beat me, I don't use BSD
> Where is the tar file with the compiler? Is that the right question?
> I used to know my way around this stuff a bit better. Can I just
> install that tar file to refresh all the binaries (and lots of other
> stuff, but who cares)? Or will it also overwrite some config files
> that I might have updated?
Beats me. Gentoo does not use tar files. I always use the default
configs.
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
[email protected] Tel:+1 541 382 8588
Veritas liberabit vos. -- Quid est veritas?
"If you can't measure it, you can't improve it." - Lord Kelvin
pgp8Sqxbxqkz_.pgp
Description: OpenPGP digital signature
