Commit 64fd099a authored by Vivia Nikolaidou's avatar Vivia Nikolaidou Committed by Sebastian Dröge

isomp4: Fix coverity warning

If atom_copy_data fails to write anything, return 0

CID #1371458
parent 4048a4e1
......@@ -2115,7 +2115,8 @@ sample_entry_tx3g_copy_data (SampleTableEntryTX3G * tx3g, guint8 ** buffer,
Atom atom;
atom_header_set (&atom, FOURCC_ftab, 18, 0);
atom_copy_data (&atom, buffer, size, offset);
if (!atom_copy_data (&atom, buffer, size, offset))
return 0;
prop_copy_uint16 (1, buffer, size, offset); /* Count must be 1 */
prop_copy_uint16 (1, buffer, size, offset); /* Font id: 1 */
prop_copy_size_string ((guint8 *) "Serif", 5, buffer, size, offset);
......@@ -2150,7 +2151,8 @@ sample_entry_tmcd_copy_data (SampleTableEntryTMCD * tmcd, guint8 ** buffer,
guint64 name_offset = *offset;
atom_header_set (&atom, FOURCC_name, 0, 0);
atom_copy_data (&atom, buffer, size, offset);
if (!atom_copy_data (&atom, buffer, size, offset))
return 0;
prop_copy_uint16 (strlen (tmcd->name.name), buffer, size, offset);
prop_copy_uint16 (tmcd->name.language_code, buffer, size, offset);
prop_copy_fixed_size_string ((guint8 *) tmcd->name.name,
......
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