diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/dcp_video_frame.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/dcp_video_frame.cc b/src/lib/dcp_video_frame.cc index 22a7c5795..34b5ece29 100644 --- a/src/lib/dcp_video_frame.cc +++ b/src/lib/dcp_video_frame.cc @@ -263,7 +263,11 @@ EncodedData::EncodedData (string file) throw FileError (_("could not open file for reading"), file); } - fread (_data, 1, _size, f); + size_t const r = fread (_data, 1, _size, f); + if (r != size_t (_size)) { + throw FileError (_("could not read encoded data"), file); + } + fclose (f); } |
