diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-01 14:19:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-01 14:19:04 +0100 |
commit | 77c235206a1b898155c9dd7ebf6ca608e295180b (patch) | |
tree | 281f314eda7404a095e76eaccad6210a98dfd791 /tools | |
parent | 817f8138cb3ef14cc6be1634d4ddd01b510c16e6 (diff) | |
parent | 63848854256a024a19435e87d6bc76fffa65e81e (diff) | |
download | ffmpeg-77c235206a1b898155c9dd7ebf6ca608e295180b.tar.gz |
Merge commit '63848854256a024a19435e87d6bc76fffa65e81e'
* commit '63848854256a024a19435e87d6bc76fffa65e81e':
qt-faststart: Check the ftello() return codes
Conflicts:
tools/qt-faststart.c
See: 4a2297294fa269e05aa2b3fe36b2ea231caa6dca
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qt-faststart.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/qt-faststart.c b/tools/qt-faststart.c index 9fb27bcb02..7834f48647 100644 --- a/tools/qt-faststart.c +++ b/tools/qt-faststart.c @@ -139,7 +139,7 @@ int main(int argc, char *argv[]) } if (fseeko(infile, -ATOM_PREAMBLE_SIZE, SEEK_CUR) || fread(ftyp_atom, atom_size, 1, infile) != 1 || - (start_offset = ftello(infile))<0) { + (start_offset = ftello(infile)) < 0) { perror(argv[1]); goto error_out; } @@ -203,6 +203,10 @@ int main(int argc, char *argv[]) goto error_out; } last_offset = ftello(infile); + if (last_offset < 0) { + perror(argv[1]); + goto error_out; + } moov_atom_size = atom_size; moov_atom = malloc(moov_atom_size); if (!moov_atom) { |