From: | Francis_Dupont@isc.org |
Subject: | Fedora 27 warning |
Date: | Thu, 21 Dec 2017 09:56:55 +0000 |
To: | bind9-public@isc.org |
I am building a ISC DHCP last code and I got
on Fedora 27 this warning from the bind 9.11.2 code:
uilding isc library in /home/dupont/dhcp-4.4.0a1/bind/bind-9.11.2/lib/isc
time.c: In function ‘isc_time_formatISO8601ms’:
time.c:480:36: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
snprintf(buf + flen, len - flen, ".%03uZ",
^~~~~~~~
time.c:480:3: note: ‘snprintf’ output between 6 and 7 bytes into a destination of size 6
snprintf(buf + flen, len - flen, ".%03uZ",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
t->nanoseconds / NS_PER_MS);
~~~~~~~~~~~~~~~~~~~~~~~~~~~
As I use a recent v9_11 repository I don't believe it was fixed.
BTW I can build standard bind9 on a Fedora 27 VM with its
gcc 7.2.1 compiler which gives this warning (is it correct?
for me there are 1+3+1+1 so 6 characters but the code
of isc_time_formatISO8601ms is so dubious in v9_11
that anyway it should be updated by its master version).
Of course if it was already fixed please close the ticket.