diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-07-19 19:06:28 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-07-19 19:06:28 +0100 |
| commit | 114912df4be84f7d8b82833b93d739b117ec8705 (patch) | |
| tree | a2a4ec38d18bb3091ab6cc531ede7020f2f99c46 /src/lib | |
| parent | 0f8a8f3b3a5381133fb29fa1d6030bbc14040439 (diff) | |
Fix warning.
Diffstat (limited to 'src/lib')
| -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); } |
