diff options
author | Alan Modra <amodra@gmail.com> | 2022-06-16 16:20:05 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-06-16 16:27:35 +0930 |
commit | 633de7089179f455d94d0fef54c68c298f545242 (patch) | |
tree | 0804e9222307e0b60df9e8ac202f9aa7bbe7eecc /gdb/testsuite | |
parent | 370426d0da768345fb53683c803d6d5a20558065 (diff) |
use of uninitialised value in input_file_open
Triggered by a file containing just "#N" or "#A". fgets when hitting
EOF before reading anything returns NULL and does not write to buf.
strchr (buf, '\n') then is reading from uninitialised memory.
* input-file.c (input_file_open): Don't assume buf contains
zero string terminator when fgets returns NULL.
Diffstat (limited to 'gdb/testsuite')
0 files changed, 0 insertions, 0 deletions