Fedora Rawhide just acquired a pre-release gcc that calls itself 8.0. nmh builds mostly OK under it, and passes 'make check'. However, there's a whole mess of new warnings, which all root-cause to the fact that gcc8 apparently does sanity checking on whether the code has bounds-checked the length parameter of snprintf() and friends before using it, and special-case notification when it's obvious that the destination won't get null-terminated. sbr/addrsbr.c manages to hit all the warnings, and lots of others have similar complaints. Full build log is attached. sbr/addrsbr.c: In function 'getname': sbr/addrsbr.c:103:5: warning: 'strncpy' specified bound 8192 equals destination size [-Wstringop-truncation] strncpy (adr, ap->text, sizeof(adr)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sbr/addrsbr.c:112:2: warning: 'strncpy' specified bound 8192 equals destination size [-Wstringop-truncation] strncpy (err, ap->err, sizeof(err)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sbr/addrsbr.c: In function 'auxformat': sbr/addrsbr.c:256:49: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=] snprintf (buffer, sizeof(buffer), "%s %s", addr, mp->m_note); ^ sbr/addrsbr.c:256:9: note: 'snprintf' output 2 or more bytes (assuming 8193) into a destination of size 8192 snprintf (buffer, sizeof(buffer), "%s %s", addr, mp->m_note); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sbr/addrsbr.c:252:45: warning: '%s' directive output may be truncated writing up to 8191 bytes into a region of size 8190 [-Wformat-truncation=] snprintf (buffer, sizeof(buffer), "%s <%s>", ^~ sbr/addrsbr.c:254:7: addr); ~~~~ sbr/addrsbr.c:252:6: note: 'snprintf' output 4 or more bytes (assuming 8195) into a destination of size 8192 snprintf (buffer, sizeof(buffer), "%s <%s>", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ legal_person (mp->m_pers ? mp->m_pers : mp->m_mbox), ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ addr); ~~~~~ sbr/addrsbr.c:248:48: warning: '%s' directive output may be truncated writing up to 8191 bytes into a region of size 8189 [-Wformat-truncation=] snprintf (buffer, sizeof(buffer), "%s %s <%s>", ^~ sbr/addrsbr.c:250:19: mp->m_note, addr); ~~~~ sbr/addrsbr.c:248:6: note: 'snprintf' output 5 or more bytes (assuming 8196) into a destination of size 8192 snprintf (buffer, sizeof(buffer), "%s %s <%s>", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ legal_person (mp->m_pers ? mp->m_pers : mp->m_mbox), ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mp->m_note, addr); ~~~~~~~~~~~~~~~~~ sbr/addrsbr.c:233:6: warning: 'strncpy' specified bound 8192 equals destination size [-Wstringop-truncation] strncpy (addr, FENDNULL(mp->m_mbox), sizeof(addr)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
build.out.gz
Description: build.out.gz
pgpuJFSgqFM2c.pgp
Description: PGP signature
-- Nmh-workers https://lists.nongnu.org/mailman/listinfo/nmh-workers
<Prev in Thread] | Current Thread | [Next in Thread> |
---|---|---|
|
Previous by Date: | Re: [Nmh-workers] Where are we at for 1.7.1?, David Levine |
---|---|
Next by Date: | Re: [Nmh-workers] GCC 8 pre-releases have escaped..., Ken Hornstein |
Previous by Thread: | Re: [Nmh-workers] Where are we at for 1.7.1?, Anthony J. Bentley |
Next by Thread: | Re: [Nmh-workers] GCC 8 pre-releases have escaped..., Ken Hornstein |
Indexes: | [Date] [Thread] [Top] [All Lists] |