nlattr: fix off-by-one error in indexed xlat lookup
* nlattr.c (decode_nla_meminfo): Decrement xlat size by one to account for XLAT_END as other users of indexed xlats do. Fixes: v4.23~89 "nlattr: print index names in netlink meminfo array"
This commit is contained in:
parent
8a5feb1cb3
commit
b2c63fa897
2
nlattr.c
2
nlattr.c
@ -198,7 +198,7 @@ decode_nla_meminfo(struct tcb *const tcp,
|
||||
tfetch_mem, print_uint32_array_member, &count,
|
||||
PAF_PRINT_INDICES | PAF_INDEX_XLAT_VALUE_INDEXED
|
||||
| XLAT_STYLE_FMT_U,
|
||||
ARRSZ_PAIR(netlink_sk_meminfo_indices),
|
||||
ARRSZ_PAIR(netlink_sk_meminfo_indices) - 1,
|
||||
"SK_MEMINFO_???");
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user