Commit 77c23520 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '63848854'

* commit '63848854':
  qt-faststart: Check the ftello() return codes

Conflicts:
	tools/qt-faststart.c

See: 4a229729Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 817f8138 63848854
...@@ -139,7 +139,7 @@ int main(int argc, char *argv[]) ...@@ -139,7 +139,7 @@ int main(int argc, char *argv[])
} }
if (fseeko(infile, -ATOM_PREAMBLE_SIZE, SEEK_CUR) || 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) { (start_offset = ftello(infile)) < 0) {
perror(argv[1]); perror(argv[1]);
goto error_out; goto error_out;
} }
...@@ -203,6 +203,10 @@ int main(int argc, char *argv[]) ...@@ -203,6 +203,10 @@ int main(int argc, char *argv[])
goto error_out; goto error_out;
} }
last_offset = ftello(infile); last_offset = ftello(infile);
if (last_offset < 0) {
perror(argv[1]);
goto error_out;
}
moov_atom_size = atom_size; moov_atom_size = atom_size;
moov_atom = malloc(moov_atom_size); moov_atom = malloc(moov_atom_size);
if (!moov_atom) { if (!moov_atom) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment