libspf2
libspf2 copied to clipboard
spf_server.c:438 --- array index 6 is past the end of the array (which contains 1 element)
Line 438 of spf_server.c reads the size of SPF_VER_STR, which is always 6 by definition, as no code redefines its value. The runtime value of "e" is affected.
./src/include/spf.h:35:#define SPF_VER_STR "v=spf1"
./src/libspf2/spf_server.c:438:13: warning: array index 6 is past the end of the array (which contains 1 element) [-Warray-bounds]
char e = rr_txt->rr[i]->txt[sizeof(SPF_VER_STR) - 1];
^ ~~~~~~~~~~~~~~~~~~~~~~~
../../src/include/spf_dns_rr.h:36:5: note: array 'txt' declared here
char txt[1];
^