mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-03-03 06:58:15 +00:00
* input-file.c (input_file_open): Check fgets return.
This commit is contained in:
parent
7bd7b3eff2
commit
1f5409bb9c
@ -1,3 +1,7 @@
|
||||
2007-01-12 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* input-file.c (input_file_open): Check fgets return.
|
||||
|
||||
2007-01-11 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* config/tc-arm.c (do_t_add_sub): Use Rd and Rs.
|
||||
|
@ -163,8 +163,8 @@ input_file_open (char *filename, /* "" means use stdin. Must not be 0. */
|
||||
c = getc (f_in);
|
||||
if (c == 'N')
|
||||
{
|
||||
fgets (buf, 80, f_in);
|
||||
if (!strncmp (buf, "O_APP", 5) && ISSPACE (buf[5]))
|
||||
if (fgets (buf, sizeof (buf), f_in)
|
||||
&& !strncmp (buf, "O_APP", 5) && ISSPACE (buf[5]))
|
||||
preprocess = 0;
|
||||
if (!strchr (buf, '\n'))
|
||||
ungetc ('#', f_in); /* It was longer. */
|
||||
@ -173,8 +173,8 @@ input_file_open (char *filename, /* "" means use stdin. Must not be 0. */
|
||||
}
|
||||
else if (c == 'A')
|
||||
{
|
||||
fgets (buf, 80, f_in);
|
||||
if (!strncmp (buf, "PP", 2) && ISSPACE (buf[2]))
|
||||
if (fgets (buf, sizeof (buf), f_in)
|
||||
&& !strncmp (buf, "PP", 2) && ISSPACE (buf[2]))
|
||||
preprocess = 1;
|
||||
if (!strchr (buf, '\n'))
|
||||
ungetc ('#', f_in);
|
||||
|
Loading…
x
Reference in New Issue
Block a user