diff options
author | Xin Long <lucien.xin@gmail.com> | 2023-04-19 18:16:32 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-04-21 10:19:30 +0300 |
commit | 2ab399a931dddacdf7202cd4b49a5187154623d1 (patch) | |
tree | 75d26d5810a8942257ebb93bf9be54c58f974a2b /net/sctp/sm_statefuns.c | |
parent | f97278ff346a5f11c68d0ac499999d5ad06a6db2 (diff) | |
download | linux-2ab399a931dddacdf7202cd4b49a5187154623d1.tar.xz |
sctp: delete the nested flexible array hmac
This patch deletes the flexible-array hmac[] from the structure
sctp_authhdr to avoid some sparse warnings:
# make C=2 CF="-Wflexible-array-nested" M=./net/sctp/
net/sctp/auth.c: note: in included file (through include/net/sctp/structs.h, include/net/sctp/sctp.h):
./include/linux/sctp.h:735:29: warning: nested flexible array
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sm_statefuns.c')
-rw-r--r-- | net/sctp/sm_statefuns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 7b8eb735fa88..97f1155a2045 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -4391,7 +4391,7 @@ static enum sctp_ierror sctp_sf_authenticate( * 3. Compute the new digest * 4. Compare saved and new digests. */ - digest = auth_hdr->hmac; + digest = (u8 *)(auth_hdr + 1); skb_pull(chunk->skb, sig_len); save_digest = kmemdup(digest, sig_len, GFP_ATOMIC); |