projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee1cb49
)
Fix: Null pointer dereference in ldlex.l
author
Nick Clifton
<nickc@redhat.com>
Mon, 9 Oct 2023 16:52:39 +0000
(17:52 +0100)
committer
Nick Clifton
<nickc@redhat.com>
Mon, 9 Oct 2023 16:52:39 +0000
(17:52 +0100)
PR 30951
* ldlex.l (yy_input): Check for YY_CURRENT_BUFFER being NULL.
ld/ChangeLog
patch
|
blob
|
history
ld/ldlex.l
patch
|
blob
|
history
diff --git
a/ld/ChangeLog
b/ld/ChangeLog
index 8423dd4ac295b3ffea0e8b6769362761bee83b3a..05b88ee0b942b2d7a300fbf6c9c28ab898d21696 100644
(file)
--- a/
ld/ChangeLog
+++ b/
ld/ChangeLog
@@
-1,5
+1,8
@@
2023-10-09 Nick Clifton <nickc@redhat.com>
+ PR 30951
+ * ldlex.l (yy_input): Check for YY_CURRENT_BUFFER being NULL.
+
PR 30954
* ldlang.c (map_input_to_output_sections): Check that os is non
NULL before using it.
diff --git
a/ld/ldlex.l
b/ld/ldlex.l
index 435172c08c30269988d37747625a5fdecc338353..94b2ea70acd7a84e9edd1a51a4012cb2a098eb0f 100644
(file)
--- a/
ld/ldlex.l
+++ b/
ld/ldlex.l
@@
-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)
{