diff options
author | Benjamin Gray <bgray@linux.ibm.com> | 2022-11-28 05:19:43 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-12-02 08:04:27 +0100 |
commit | 94ba4f2c33f42dae7813dc169a177e922a39560c (patch) | |
tree | 575b97fcb0ebaa8db09dfff603b7f91634892535 /arch/powerpc/lib/Makefile | |
parent | selftests/powerpc: Use mfspr/mtspr macros (diff) | |
download | linux-94ba4f2c33f42dae7813dc169a177e922a39560c.tar.xz linux-94ba4f2c33f42dae7813dc169a177e922a39560c.zip |
selftests/powerpc: Add ptrace setup_core_pattern() null-terminator
- malloc() does not zero the buffer,
- fread() does not null-terminate it's output,
- `cat /proc/sys/kernel/core_pattern | hexdump -C` shows the file is
not inherently null-terminated
So using string operations on the buffer is risky. Explicitly add a null
character to the end to make it safer.
Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221128041948.58339-3-bgray@linux.ibm.com
Diffstat (limited to 'arch/powerpc/lib/Makefile')
0 files changed, 0 insertions, 0 deletions