]> granicus.if.org Git - strace/commitdiff
nlattr: ignore nla_type flags when selecting nlattr decoder
authorEugene Syromyatnikov <evgsyr@gmail.com>
Tue, 28 Aug 2018 01:07:59 +0000 (03:07 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 3 Sep 2018 10:16:50 +0000 (10:16 +0000)
* nlattr.c (decode_nlattr_with_data): Apply NLA_TYPE_MASK to nla_type
before decoder selection.

nlattr.c

index e7ea5330794716f67d455ba16230ccbd72244511..315d69941a0c42ff922a3e007947a8224cccc970 100644 (file)
--- a/nlattr.c
+++ b/nlattr.c
@@ -101,7 +101,8 @@ decode_nlattr_with_data(struct tcb *const tcp,
        print_nlattr(nla, table, dflt);
 
        if (nla_len > NLA_HDRLEN) {
-               const unsigned int idx = size ? nla->nla_type : 0;
+               const unsigned int idx =
+                       size ? nla->nla_type & NLA_TYPE_MASK : 0;
 
                tprints(", ");
                if (!decoders