diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-25 00:39:33 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-25 01:32:45 +0200 |
commit | 4a2297294fa269e05aa2b3fe36b2ea231caa6dca (patch) | |
tree | 50a196bff52e7607413355c9d10f5c9c5760a144 /tools | |
parent | ed68085104c26dbb636df3c774216d4675ddf5e1 (diff) | |
download | ffmpeg-streaming-4a2297294fa269e05aa2b3fe36b2ea231caa6dca.zip ffmpeg-streaming-4a2297294fa269e05aa2b3fe36b2ea231caa6dca.tar.gz |
qt-faststart: check return of ftello()
Fixes CID739863
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qt-faststart.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c index 80c5d4b..3e2acd5 100644 --- a/tools/qt-faststart.c +++ b/tools/qt-faststart.c @@ -137,11 +137,11 @@ int main(int argc, char *argv[]) goto error_out; } if ( fseeko(infile, -ATOM_PREAMBLE_SIZE, SEEK_CUR) - || fread(ftyp_atom, atom_size, 1, infile) != 1) { + || fread(ftyp_atom, atom_size, 1, infile) != 1 + || (start_offset = ftello(infile))<0) { perror(argv[1]); goto error_out; } - start_offset = ftello(infile); } else { int ret; /* 64-bit special case */ |