diff options
| author | Breno Leitao <[email protected]> | 2018-06-26 10:20:12 -0300 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2018-07-02 23:59:39 +1000 |
| commit | 09a61e894ac852fb063ee0b54fc513b13abcab08 (patch) | |
| tree | f8db02ec643e5b83034caa30269c8b9dffbae54e /tools/perf/scripts/python/stackcollapse.py | |
| parent | f3988ca4c74e136e49487b51231d324d0c923495 (diff) | |
selftests/powerpc: Fix strncpy usage
There is a buffer overflow in dscr_inherit_test.c test. In main(), strncpy()'s
third argument is the length of the source, not the size of the destination
buffer, which makes strncpy() behaves like strcpy(), causing a buffer overflow
if argv[0] is bigger than LEN_MAX (100).
This patch maps 'prog' to the argv[0] memory region, removing the static
allocation and the LEN_MAX size restriction.
Signed-off-by: Breno Leitao <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions