Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorKuba Sejdak <jakub.sejdak@phoesys.com>2016-06-24 15:14:51 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-06-27 14:23:34 +0300
commit0601c031098c02beae819b04844b44f9aabcebf8 (patch)
tree599d363b16b7ed67454b8f0640e1d5b638bab9c1 /newlib
parentcd169e629ac1891eb4c5e3f7b539186bf80ad394 (diff)
Phoenix-RTOS: Add checking EOF in getmntent().
Diffstat (limited to 'newlib')
-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;
}