aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/prog_array_init.c
diff options
context:
space:
mode:
authorMartin Kaiser <[email protected]>2022-11-26 17:01:23 +0100
committerGreg Kroah-Hartman <[email protected]>2022-12-05 13:28:58 +0100
commit1ed513f3e0ff13f2a84e3479b7774f213c7d7066 (patch)
treef08872a3a44e22d9a5cdd548b1a242624cd97688 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c
parent0e73b1276a51eeb649c9676e41c9e4208c8b40af (diff)
staging: r8188eu: pass only ies to process_p2p_ps_ie
The process_p2p_ps_ie function parses the information elements of a beacon message and extracts p2p-related info. process_p2p_ps_ie does not receive a pointer to the information elements as one would expect. Instead it receives a pointer to the timestamp field in the beacon message. process_p2p_ps_ie increments this pointer by _BEACON_IE_OFFSET_ to jump to the start of the information elements (and decreases the buffer length accordingly). This is clumsy and hard to understand. Rewrite this such that process_p2p_ps_ie takes a pointer to the information elements and the total length of all elements. Check up-front that the total length is not negative. Tested-by: Philipp Hortmann <[email protected]> # Edimax N150 Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions