diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2011-05-29 16:17:17 +0300 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2011-05-29 16:17:17 +0300 |
commit | 8bea6ce4920cab0c065bcc6ae1eb0b26fc582ebe (patch) | |
tree | bb8ede82e2230ffdeb4ede2295decf8c03b48c5c /libgfortran | |
parent | fa7660069590bd9620cc50c003f13cb7fbd24e59 (diff) | |
download | gcc-8bea6ce4920cab0c065bcc6ae1eb0b26fc582ebe.zip gcc-8bea6ce4920cab0c065bcc6ae1eb0b26fc582ebe.tar.gz gcc-8bea6ce4920cab0c065bcc6ae1eb0b26fc582ebe.tar.bz2 |
PR 49214 fd_gets should return NULL if nothing was read
From-SVN: r174395
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 5 | ||||
-rw-r--r-- | libgfortran/runtime/backtrace.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 1d08da8..f0e3078 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,5 +1,10 @@ 2011-05-29 Janne Blomqvist <jb@gcc.gnu.org> + PR libfortran/49214 + * runtime/backtrace.c (fd_gets): Return NULL if nothing was read. + +2011-05-29 Janne Blomqvist <jb@gcc.gnu.org> + PR libfortran/19155 * io/read.c (convert_real): Check for invalid input by comparing endptr instead of EINVAL. diff --git a/libgfortran/runtime/backtrace.c b/libgfortran/runtime/backtrace.c index dff4466..943332a 100644 --- a/libgfortran/runtime/backtrace.c +++ b/libgfortran/runtime/backtrace.c @@ -95,6 +95,8 @@ fd_gets (char *s, int size, int fd) else { s[i] = '\0'; + if (i == 0) + return NULL; break; } } |