aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/bio/bss_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bio/bss_file.c')
-rw-r--r--crypto/bio/bss_file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c
index 8b3ff278d9..826b361fa2 100644
--- a/crypto/bio/bss_file.c
+++ b/crypto/bio/bss_file.c
@@ -162,6 +162,12 @@ static int MS_CALLBACK file_read(BIO *b, char *out, int outl)
if (b->init && (out != NULL))
{
ret=fread(out,1,(int)outl,(FILE *)b->ptr);
+ if(ret == 0 && ferror((FILE *)b->ptr))
+ {
+ SYSerr(SYS_F_FREAD,get_last_sys_error());
+ BIOerr(BIO_F_FILE_READ,ERR_R_SYS_LIB);
+ ret=-1;
+ }
}
return(ret);
}