diff options
author | Nick Clifton <nickc@redhat.com> | 2023-10-09 17:52:39 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2023-10-09 17:52:39 +0100 |
commit | 1b334e27f8410c7fbe3417023258eb9e03ec9592 (patch) | |
tree | d038ef33d9ce58e516e16c603d9d60a36810ef7b /ld/ldlex.l | |
parent | ee1cb49e5a9de8049d887abd8c9f2eff1851147e (diff) | |
download | gdb-1b334e27f8410c7fbe3417023258eb9e03ec9592.zip gdb-1b334e27f8410c7fbe3417023258eb9e03ec9592.tar.gz gdb-1b334e27f8410c7fbe3417023258eb9e03ec9592.tar.bz2 |
Fix: Null pointer dereference in ldlex.l
PR 30951
* ldlex.l (yy_input): Check for YY_CURRENT_BUFFER being NULL.
Diffstat (limited to 'ld/ldlex.l')
-rw-r--r-- | ld/ldlex.l | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -668,7 +668,7 @@ static int yy_input (char *buf, int max_size) { int result = 0; - if (YY_CURRENT_BUFFER->yy_input_file) + if (YY_CURRENT_BUFFER != NULL && YY_CURRENT_BUFFER->yy_input_file) { if (yyin) { |