aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/event_analyzing_sample.py
diff options
context:
space:
mode:
authorDenis Efremov <[email protected]>2019-10-01 15:08:23 +0300
committerKalle Valo <[email protected]>2019-10-02 20:22:59 +0300
commit2c840676be8ffc624bf9bb4490d944fd13c02d71 (patch)
tree60af9e4f60e1303e47290e8aa64ef9106f9a70ad /tools/perf/scripts/python/event_analyzing_sample.py
parent315cee426f87658a6799815845788fde965ddaad (diff)
wil6210: check len before memcpy() calls
memcpy() in wmi_set_ie() and wmi_update_ft_ies() is called with src == NULL and len == 0. This is an undefined behavior. Fix it by checking "ie_len > 0" before the memcpy() calls. As suggested by GCC documentation: "The pointers passed to memmove (and similar functions in <string.h>) must be non-null even when nbytes==0, so GCC can use that information to remove the check after the memmove call." [1] [1] https://gcc.gnu.org/gcc-4.9/porting_to.html Cc: Maya Erez <[email protected]> Cc: Kalle Valo <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: [email protected] Signed-off-by: Denis Efremov <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions