Report information
The Basics
Id:
46892
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Cc:
AdminCc:

BugTracker
Version Fixed:
9.9.12, 9.9.12(sub), 9.10.7, 9.10.7(sub), 9.11.3, 9.12.1
Version Found:
(no value)
Versions Affected:
(no value)
Versions Planned:
(no value)
Priority:
P2 Normal
Severity:
S2 Normal
CVSS Score:
(no value)
CVE ID:
(no value)
Component:
(no value)
Area:
bug

Dates
Created:Thu, 21 Dec 2017 04:56:55 -0500
Updated:Mon, 01 Jan 2018 18:51:01 -0500
Closed:Mon, 01 Jan 2018 18:50:25 -0500



This bug tracker is no longer active.

Please go to our Gitlab to submit issues (both feature requests and bug reports) for active projects maintained by Internet Systems Consortium (ISC).

Due to security and confidentiality requirements, full access is limited to the primary maintainers.

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.
Back ported the flen > 0 check. Added some requires and insisted nanoseconds is in range. Will need to add similar requires and insists to the two new functions in 9.12/master.
On Wed Dec 27 01:19:45 2017, marka wrote: > Back ported the flen > 0 check. => there is still an extra "." in the snprintf format string > Added some requires and insisted > nanoseconds is in range. > > Will need to add similar requires and insists to the two new functions > in 9.12/master. => agreed! Please fix the format and up-port requires and insists
From: "Mark Andrews" <marka@isc.org>
Subject: Re: [ISC-Bugs #46892] Fedora 27 warning
To: bind9-public@isc.org
Date: Sun, 31 Dec 2017 00:46:06 +1100
> On 31 Dec 2017, at 12:11 am, Francis Dupont via RT <bind9-public@isc.org> wrote: > > On Wed Dec 27 01:19:45 2017, marka wrote: >> Back ported the flen > 0 check. > > => there is still an extra "." in the snprintf format string We want “.DDDZ” which “.%03uZ” produces. The period separates the seconds from the milliseconds. >> Added some requires and insisted >> nanoseconds is in range. >> >> Will need to add similar requires and insists to the two new functions >> in 9.12/master. > > => agreed! > > Please fix the format and up-port requires and insists > > > -- > Ticket History: https://bugs.isc.org/Ticket/Display.html?id=46892 -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: marka@isc.org
On Sat Dec 30 13:46:14 2017, marka wrote: > > => there is still an extra "." in the snprintf format string > > We want “.DDDZ” which “.%03uZ” produces. The period separates the > seconds from the milliseconds. => argh! I was disturbed by the isc_time_formatshorttimestamp() code which was just after in master (and v9_12) and is clearly wrong (missing Z and .).
On Sun Dec 31 00:32:24 2017, fdupont wrote: > On Sat Dec 30 13:46:14 2017, marka wrote: > > > => there is still an extra "." in the snprintf format string > > > > We want “.DDDZ” which “.%03uZ” produces. The period separates the > > seconds from the milliseconds. > > => argh! I was disturbed by the isc_time_formatshorttimestamp() > code which was just after in master (and v9_12) and is clearly > wrong (missing Z and .). created ticket.
4852. [bug] Handle strftime() failing in isc_time_formatISO8601ms. Add REQUIRE's and INSIST's to isc_time_formattimestamp, isc_time_formathttptimestamp, isc_time_formatISO8601, isc_time_formatISO8601ms. [RT #46892] 4852. [bug] Add REQUIRE's and INSIST's to isc_time_formattimestamp, isc_time_formathttptimestamp, isc_time_formatISO8601. [RT #46892]