diff options
author | Eugene Syromyatnikov <evgsyr@gmail.com> | 2021-05-03 17:58:18 +0200 |
---|---|---|
committer | Eugene Syromyatnikov <evgsyr@gmail.com> | 2021-05-03 19:06:28 +0200 |
commit | 88b93b94ed8be5fe94a05f4ef5b8ee2fe8228044 (patch) | |
tree | 9d9c50c57fe9d9b808f491a8fbc8068a8d9124fc | |
parent | 00c531c49077f67bf62f859dc6da7bcabb737d15 (diff) | |
download | strace-esyr/af-spec-fix.tar.gz |
rtnl_link: pass 0 as opaque_data in decode_ifla_af_spec's decode_nlattr callesyr/af-spec-fix
It has to be 0 to properly trigger decode_nlattr's size=0 special case
logic (since opaque_data argument is generated by decode_nlattr in that case),
but it was sloppily just passed through the caller's opaque_data
instead, which coincidentally used to be 0 up to v5.6~125 "rtnl_link:
use the family from ifinfomsg".
* src/rtnl_link.c (decode_ifla_af_spec): Pass 0 as the opaque_data argument
to the decode_nlattr() call.
Reported-by: Dmitry V. Levin <ldv@strace.io>
Fixes: v4.23~41 "rtnl_link: decode IFLA_AF_SPEC"
Fixes: v5.6~125 "rtnl_link: use the family from ifinfomsg"
-rw-r--r-- | src/rtnl_link.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rtnl_link.c b/src/rtnl_link.c index 6a8e5137b..d2d844459 100644 --- a/src/rtnl_link.c +++ b/src/rtnl_link.c @@ -883,7 +883,7 @@ decode_ifla_af_spec(struct tcb *const tcp, nla_decoder_t af_spec_decoder = &decode_ifla_af; decode_nlattr(tcp, addr, len, addrfams, "AF_???", - &af_spec_decoder, 0, opaque_data); + &af_spec_decoder, 0, 0); return true; } |