summaryrefslogtreecommitdiffstats
path: root/libhb/encavcodec.c
diff options
context:
space:
mode:
authorSean McGovern <[email protected]>2016-06-30 11:56:46 -0400
committerSean McGovern <[email protected]>2016-07-01 14:07:30 -0400
commitb7645e7842703d52c44feaa85cfb3c490e09c8dc (patch)
treefff45a18b5dab225397f326e10b00e2c61158d60 /libhb/encavcodec.c
parent4275507a21562299ed6b27cebc40c7308fd594a8 (diff)
libhb: don't ignore the return result from fread()
Diffstat (limited to 'libhb/encavcodec.c')
-rw-r--r--libhb/encavcodec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c
index f7ed25233..a8781f057 100644
--- a/libhb/encavcodec.c
+++ b/libhb/encavcodec.c
@@ -302,7 +302,11 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
fseek( pv->file, 0, SEEK_SET );
log = malloc( size + 1 );
log[size] = '\0';
- fread( log, size, 1, pv->file );
+ if (size > 0 &&
+ fread( log, size, 1, pv->file ) < size)
+ {
+ hb_log( "encavcodecInit: Failed to read %s" , filename);
+ }
fclose( pv->file );
pv->file = NULL;