diff options
| author | Namhyung Kim <[email protected]> | 2021-02-24 07:14:38 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2021-03-06 19:54:31 +0000 |
| commit | bd57a9f33abc0adede5bafa06b2f1af3de03190d (patch) | |
| tree | bd0e8106719620bc2ecf9ea084e8b4feafe77d8f /drivers/net/wan/lapbether.c | |
| parent | perf stat: Fix use-after-free when -r option is used (diff) | |
| download | kernel-bd57a9f33abc0adede5bafa06b2f1af3de03190d.tar.gz kernel-bd57a9f33abc0adede5bafa06b2f1af3de03190d.zip | |
perf daemon: Fix compile error with Asan
I'm seeing a build failure when build with address sanitizer. It seems
we could write to the name[100] if the var is longer.
$ make EXTRA_CFLAGS=-fsanitize=address
...
CC builtin-daemon.o
In function ‘get_session_name’,
inlined from ‘session_config’ at builtin-daemon.c:164:6,
inlined from ‘server_config’ at builtin-daemon.c:223:10:
builtin-daemon.c:155:11: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
155 | *session = 0;
| ~~~~~~~~~^~~
builtin-daemon.c: In function ‘server_config’:
builtin-daemon.c:162:7: note: at offset 100 to object ‘name’ with size 100 declared here
162 | char name[100];
| ^~~~
Fixes: c0666261ff38 ("perf daemon: Add config file support")
Signed-off-by: Namhyung Kim <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'drivers/net/wan/lapbether.c')
0 files changed, 0 insertions, 0 deletions
