X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_open.c;h=11476de43cb85bcec38ceb56cab7a42da86454c9;hb=9b54930dbbfe127febcd165e79f6019f822ec802;hp=2b0f30391d35fad220ca1e91b9190add9422a86a;hpb=0dc5d6d50c0d95ba4f04b656358b26518d4ce854;p=rrdtool.git diff --git a/src/rrd_open.c b/src/rrd_open.c index 2b0f303..11476de 100644 --- a/src/rrd_open.c +++ b/src/rrd_open.c @@ -107,7 +107,7 @@ rrd_open(const char *file_name, FILE **in_file, rrd_t *rrd, int rdwr) MYFREAD(rrd->stat_head, stat_head_t, 1) /* lets see if the first read worked */ - if (ferror( *in_file )){ + if (ferror( *in_file ) || feof(*in_file)) { rrd_set_error("reading the cookie off %s faild",file_name); fclose(*in_file); return(-1);