mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-09-22 04:15:54 -04:00
Fix: Do not segfaul on bad Opus streams
This commit is contained in:
parent
5b512da304
commit
89804764b0
@ -218,7 +218,7 @@ ogg_codec_t *initial_opus_page (format_plugin_t *plugin, ogg_page *page)
|
||||
ogg_stream_packetout (&codec->os, &packet);
|
||||
|
||||
ICECAST_LOG_DEBUG("checking for opus codec");
|
||||
if (strncmp((char *)packet.packet, "OpusHead", 8) != 0)
|
||||
if (packet.bytes < 8 || strncmp((char *)packet.packet, "OpusHead", 8) != 0)
|
||||
{
|
||||
ogg_stream_clear (&codec->os);
|
||||
free (codec);
|
||||
|
Loading…
Reference in New Issue
Block a user