aiffmux: avoid integer overflow
These values are 32 bits, and width is a multiple of 8. https://bugzilla.gnome.org/show_bug.cgi?id=654278
This commit is contained in:
parent
ffa9c81798
commit
fb2479d1da
@ -236,7 +236,7 @@ gst_aiff_mux_write_comm_header (GstAiffMux * aiffmux, guint audio_data_size,
|
|||||||
gst_byte_writer_put_uint16_be (writer, aiffmux->channels);
|
gst_byte_writer_put_uint16_be (writer, aiffmux->channels);
|
||||||
/* numSampleFrames value will be overwritten when known */
|
/* numSampleFrames value will be overwritten when known */
|
||||||
gst_byte_writer_put_uint32_be (writer,
|
gst_byte_writer_put_uint32_be (writer,
|
||||||
(audio_data_size * 8) / (aiffmux->width * aiffmux->channels));
|
audio_data_size / (aiffmux->width / 8 * aiffmux->channels));
|
||||||
gst_byte_writer_put_uint16_be (writer, aiffmux->depth);
|
gst_byte_writer_put_uint16_be (writer, aiffmux->depth);
|
||||||
gst_aiff_mux_write_ext (writer, aiffmux->rate);
|
gst_aiff_mux_write_ext (writer, aiffmux->rate);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user