Page MenuHomeFreeBSD

ping: increase buffer size for the string representation of n_time
ClosedPublic

Authored by jansucan on Aug 19 2019, 4:59 PM.
Tags
None
Referenced Files
F153958582: D21325.id61006.diff
Sat, Apr 25, 2:38 AM
Unknown Object (File)
Thu, Apr 23, 7:28 AM
Unknown Object (File)
Mon, Apr 13, 8:02 PM
Unknown Object (File)
Mon, Apr 13, 6:32 AM
Unknown Object (File)
Thu, Apr 9, 11:39 PM
Unknown Object (File)
Tue, Apr 7, 3:33 PM
Unknown Object (File)
Mon, Apr 6, 8:04 PM
Unknown Object (File)
Thu, Mar 26, 4:51 PM
Subscribers

Details

Summary

Increase buffer size for the string representation of n_time

This fixes -Wformat-truncation warning when compiled with GCC.

ICMP timestamp is a 32-bit number. In pr_ntime(), number of minutes
and seconds is always 2 characters wide. Max. number of hours is 4
characters wide. The buffer size should be at least:

4 + 2 + 2 + 1 (':') + 1 (':') + 1 ('\0') = 11

Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google, inc. (Google Summer of Code 2019)

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 25961
Build 24519: arc lint + arc unit