Commit 0f862849 authored by Paul Eggert's avatar Paul Eggert

Fix Fload dangling pointer

* src/lread.c (Fload): Expand decl’s lifetime to match its use.
Bug found by gcc -fsanitize=address.
parent bc4ed683
Pipeline #1360 failed with stage
in 58 minutes and 52 seconds
......@@ -1439,6 +1439,10 @@ Return t if the file exists and loads successfully. */)
specbind (Qinhibit_file_name_operation, Qnil);
specbind (Qload_in_progress, Qt);
/* Declare here rather than inside the else-part because the storage
might be accessed by the unbind_to call below. */
struct infile input;
if (is_module)
{
#ifdef HAVE_MODULES
......@@ -1453,7 +1457,6 @@ Return t if the file exists and loads successfully. */)
}
else
{
struct infile input;
input.stream = stream;
input.lookahead = 0;
infile = &input;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment