PR 49214 fd_gets should return NULL if nothing was read

From-SVN: r174395
This commit is contained in:
Janne Blomqvist 2011-05-29 16:17:17 +03:00
parent fa76600695
commit 8bea6ce492
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -95,6 +95,8 @@ fd_gets (char *s, int size, int fd)
else
{
s[i] = '\0';
if (i == 0)
return NULL;
break;
}
}