Commit 17d5f083 authored by Edward Hervey's avatar Edward Hervey 🤘 Committed by Edward Hervey

oggstream: protect against out-of-bounds read

We need at least 17 bytes of data for a valid flac header

oss-fuzz #6974
parent 57516c51
......@@ -1050,6 +1050,9 @@ static gboolean
is_header_fLaC (GstOggStream * pad, ogg_packet * packet)
{
if (pad->n_header_packets_seen == 1) {
if (packet->bytes < 17)
return FALSE;
pad->granulerate_n = (packet->packet[14] << 12) |
(packet->packet[15] << 4) | ((packet->packet[16] >> 4) & 0xf);
}
......
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