Yo Hal!

On Tue, 28 Oct 2025 21:48:32 -0700
Hal Murray <[email protected]> wrote:

> In function 'ntrip_sourcetable_parse',        
>     inlined from 'ntrip_open' at
> gpsd-3.26.2~dev/gpsd/net_ntrip.c:1123:15: gcc -o
> gpsd-3.26.2~dev/gpsd/net_ntrip.o -c -pthread -Wall -Wextra
> -fexcess-preci gpsd-3.26.2~dev/gpsd/net_ntrip.c:289:16: warning:
> array subscript 513 is above array bounds of 'char[512]'
> [-Warray-bounds=] 289 |         memset(&buf[len], 0, buf_avail);
>       |                ^~~~~~~~~
> gpsd-3.26.2~dev/gpsd/net_ntrip.c: In function 'ntrip_open':
> gpsd-3.26.2~dev/gpsd/net_ntrip.c:273:10: note: while referencing 'buf'
>   273 |     char buf[BUFSIZ / 2];   // half of BUFSIZE, so we can 
> GPSD_LOG() it
>       |          ^~~              

Coverity has been complaing about that  one for a while.  Yet another
possible fix pushed.  Please test.

> gcc -o gpsd-3.26.2~dev/clients/gpsrinex.o -c -pthread -Wall -Wextra 
> -fexcess-precision=standard -Wcast-align -Wcast-qual 
> -Wimplicit-fallthrough -Wmissing-declarations -Wmissing-prototypes 
> -Wno-missing-field-initializers -Wno-uninitialized -Wpointer-arith 
> -Wreturn-type -Wstrict-prototypes -Wundef -Wvla -O2 -pthread 
> gpsd-3.26.2~dev/clients/gpsrinex.c
> In file included from /usr/include/ctype.h:100,
>                  from gpsd-3.26.2~dev/clients/gpsrinex.c:60:
> gpsd-3.26.2~dev/clients/gpsrinex.c: In function 'rtrim':
> gpsd-3.26.2~dev/clients/gpsrinex.c:1008:23: warning: array subscript
> has type 'char' [-Wchar-subscripts]
>  1008 |            isspace(str[end])) {

I think  Greg already got this one.

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

Attachment: pgp4Vaa7EQB9R.pgp
Description: OpenPGP digital signature

Reply via email to