mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-09-29 04:25:55 -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);
|
ogg_stream_packetout (&codec->os, &packet);
|
||||||
|
|
||||||
ICECAST_LOG_DEBUG("checking for opus codec");
|
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);
|
ogg_stream_clear (&codec->os);
|
||||||
free (codec);
|
free (codec);
|
||||||
|
Loading…
Reference in New Issue
Block a user