atomsrecovery: Error out when fseek() fails instead of silently ignoring

CID 1403262
This commit is contained in:
Sebastian Dröge 2017-03-27 11:43:31 +03:00
parent 79d9cd44b6
commit ea4e9fc2d4

View file

@ -673,8 +673,11 @@ moov_recov_parse_trak (MoovRecovFile * moovrf, TrakRecovData * trakrd)
if (!moov_recov_parse_mdia (moovrf, trakrd)) if (!moov_recov_parse_mdia (moovrf, trakrd))
return FALSE; return FALSE;
fseek (moovrf->file, (long int) trakrd->mdia_file_offset + trakrd->mdia_size, if (fseek (moovrf->file,
SEEK_SET); (long int) trakrd->mdia_file_offset + trakrd->mdia_size,
SEEK_SET) != 0)
return FALSE;
trakrd->extra_atoms_offset = ftell (moovrf->file); trakrd->extra_atoms_offset = ftell (moovrf->file);
trakrd->extra_atoms_size = size - (trakrd->extra_atoms_offset - offset); trakrd->extra_atoms_size = size - (trakrd->extra_atoms_offset - offset);