mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-25 20:03:58 +08:00
re PR libfortran/34291 (Segfault in io/list_read.c handling of end conditions)
2007-11-30 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/34291 * io/list_read.c (read_character): When reading an unquoted string, return if special characters that could signify the end of the namelist read are encountered. From-SVN: r130548
This commit is contained in:
parent
a6968b8b9d
commit
3c55599b1f
@ -1,3 +1,10 @@
|
||||
2007-11-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR libfortran/34291
|
||||
* io/list_read.c (read_character): When reading an unquoted string,
|
||||
return if special characters that could signify the end of the namelist
|
||||
read are encountered.
|
||||
|
||||
2007-11-29 Steven G. Kargl <kargls@comcast.net>
|
||||
|
||||
PR libfortran/33583
|
||||
|
@ -896,7 +896,8 @@ read_character (st_parameter_dt *dtp, int length __attribute__ ((unused)))
|
||||
if (dtp->u.p.namelist_mode)
|
||||
{
|
||||
if (dtp->u.p.current_unit->flags.delim == DELIM_APOSTROPHE
|
||||
|| dtp->u.p.current_unit->flags.delim == DELIM_QUOTE)
|
||||
|| dtp->u.p.current_unit->flags.delim == DELIM_QUOTE
|
||||
|| c == '&' || c == '$' || c == '/')
|
||||
{
|
||||
unget_char (dtp, c);
|
||||
return;
|
||||
@ -925,6 +926,7 @@ read_character (st_parameter_dt *dtp, int length __attribute__ ((unused)))
|
||||
}
|
||||
|
||||
l_push_char (dtp, c);
|
||||
|
||||
if (c == '=' || c == '(')
|
||||
{
|
||||
dtp->u.p.item_count = 0;
|
||||
@ -936,6 +938,7 @@ read_character (st_parameter_dt *dtp, int length __attribute__ ((unused)))
|
||||
|
||||
/* The string is too long to be a valid object name so assume that it
|
||||
is a string to be read in as a value. */
|
||||
dtp->u.p.item_count = 0;
|
||||
dtp->u.p.line_buffer_enabled = 1;
|
||||
goto get_string;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user