summaryrefslogtreecommitdiffstats
path: root/src/recur.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/recur.c')
-rw-r--r--src/recur.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/recur.c b/src/recur.c
index b373b11..79046f8 100644
--- a/src/recur.c
+++ b/src/recur.c
@@ -374,7 +374,9 @@ recur_apoint_scan (FILE *f, struct tm start, struct tm end, char type,
time_t tstart, tend, tuntil;
/* Read the appointment description */
- fgets (buf, sizeof buf, f);
+ if (!fgets (buf, sizeof buf, f))
+ return NULL;
+
nl = strchr (buf, '\n');
if (nl)
{
@@ -419,7 +421,9 @@ recur_event_scan (FILE *f, struct tm start, int id, char type, int freq,
time_t tstart, tuntil;
/* Read the event description */
- fgets (buf, sizeof buf, f);
+ if (!fgets (buf, sizeof buf, f))
+ return NULL;
+
nl = strchr (buf, '\n');
if (nl)
{