Possible Incorrect Pointer Reference in variable.c

Jon Forrest <[email protected]> Mon, 27 Sep 2021 11:48:01 -0700
Newsgroups gmane.comp.gnu.make.devel
Message-ID <[email protected]>
In the latest rev of variable.c starting at line #1637 I see:


-----

1637 struct variable *
1638 try_variable_definition (const floc *flocp, const char *line,
1639                          enum variable_origin origin, int target_var)
1640 {
1641   struct variable v;
1642   struct variable *vp;
1643
1644   if (flocp != 0)
1645     v.fileinfo = *flocp;
1646   else
1647     v.fileinfo.filenm = 0;

-----

How can line #1647 ever work? "v" is a newly
created local variable, which means "v.fileinfo"
hasn't been given a value yet, which means that
"v.fileinfo.filenm" could be anywhere.

Cordially,
Jon Forrest