diff options
author | Eugene Syromyatnikov <evgsyr@gmail.com> | 2021-12-01 17:11:02 +0100 |
---|---|---|
committer | Eugene Syromyatnikov <evgsyr@gmail.com> | 2021-12-01 17:38:42 +0100 |
commit | e27b06773eaf5c0307bcc5637d7457be9be1e6ea (patch) | |
tree | 571ab0b66843b9c2bfb8882cd182330c5644cdff | |
parent | ae419b38e06a9f453fc3a141d92f9835f49ae8b7 (diff) | |
download | strace-esyr/5.15.tar.gz |
print_ifindex: fix IFNAME_QUOTED_SZ definitionesyr/5.15
sizeof(IFNAMSIZ) instead of IFNAMSIZ was mistakenly used
for IFNAME_QUOTED_SZ initial definition in commit v4.23~87
"print_ifindex: respect xlat style settings".
* src/print_ifindex.c (IFNAME_QUOTED_SZ): Use IFNAMSIZ
instead of sizeof(IFNAMSIZ).
* NEWS: Mention it.
Reported-by: Paulo Andrade <pandrade@redhat.com>
Suggested-by: Paulo Andrade <pandrade@redhat.com>
Fixes: v4.23~87 "print_ifindex: respect xlat style settings"
References: https://bugzilla.redhat.com/show_bug.cgi?id=2028146
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | src/print_ifindex.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -38,6 +38,10 @@ Noteworthy changes in release ?.?? (????-??-??) * Fixed printing of struct bpf_prog_info.map_ids array. * Fixed behaviour of "dev", "pidfd", and "socket" arguments of the --print-fds option to no longer imply the "path" argument. + * Fixed insufficient buffer size used for network interface name printing, + that previously led to assertions on attempts of printing interface names + that require quoting, for example, names longer than 4 characters in -xx + mode (addresses RHBZ bug #2028146). Noteworthy changes in release 5.14 (2021-09-02) =============================================== diff --git a/src/print_ifindex.c b/src/print_ifindex.c index ec480931c..dc9d59243 100644 --- a/src/print_ifindex.c +++ b/src/print_ifindex.c @@ -13,7 +13,7 @@ # define INI_PFX "if_nametoindex(\"" # define INI_SFX "\")" -# define IFNAME_QUOTED_SZ (sizeof(IFNAMSIZ) * 4 + 3) +# define IFNAME_QUOTED_SZ (IFNAMSIZ * 4 + 3) const char * get_ifname(const unsigned int ifindex) |