summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuba Sejdak <jakub.sejdak@phoesys.com>2016-06-24 14:14:51 +0200
committerCorinna Vinschen <corinna@vinschen.de>2016-06-27 13:23:34 +0200
commit0601c031098c02beae819b04844b44f9aabcebf8 (patch)
tree599d363b16b7ed67454b8f0640e1d5b638bab9c1
parentcd169e629ac1891eb4c5e3f7b539186bf80ad394 (diff)
downloadcygnal-0601c031098c02beae819b04844b44f9aabcebf8.tar.gz
cygnal-0601c031098c02beae819b04844b44f9aabcebf8.tar.bz2
cygnal-0601c031098c02beae819b04844b44f9aabcebf8.zip
Phoenix-RTOS: Add checking EOF in getmntent().
-rw-r--r--newlib/libc/sys/phoenix/getmntent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/sys/phoenix/getmntent.c b/newlib/libc/sys/phoenix/getmntent.c
index 74d00b15b..e61d24503 100644
--- a/newlib/libc/sys/phoenix/getmntent.c
+++ b/newlib/libc/sys/phoenix/getmntent.c
@@ -47,7 +47,7 @@ struct mntent *getmntent_r(FILE *fp, struct mntent *result, char *buffer, int bu
buff_ptr = buffer;
- if (getline(&line, &size, fp) == -1) {
+ if (getline(&line, &size, fp) == -1 || feof(fp)) {
free(line);
return NULL;
}