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
F106102031: D21325.diff
Wed, Dec 25, 10:38 AM
Unknown Object (File)
Nov 25 2024, 7:58 AM
Unknown Object (File)
Nov 6 2024, 11:05 AM
Unknown Object (File)
Nov 1 2024, 3:54 AM
Unknown Object (File)
Oct 22 2024, 8:07 PM
Unknown Object (File)
Oct 3 2024, 7:04 PM
Unknown Object (File)
Sep 7 2024, 4:38 PM
Unknown Object (File)
Sep 5 2024, 9:37 AM
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