mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
gst/wavparse/gstwavparse.c: Make header field check conditional. Fixes #433135
Original commit message from CVS: * gst/wavparse/gstwavparse.c: (gst_wavparse_stream_headers): Make header field check conditional. Fixes #433135
This commit is contained in:
parent
7002f0336b
commit
fa7454bda2
2 changed files with 9 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-04-25 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* gst/wavparse/gstwavparse.c: (gst_wavparse_stream_headers):
|
||||
Make header field check conditional. Fixes #433135
|
||||
|
||||
2007-04-24 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* docs/plugins/Makefile.am:
|
||||
|
|
|
@ -1078,10 +1078,6 @@ gst_wavparse_stream_headers (GstWavParse * wav)
|
|||
/* do more sanity checks of header fields
|
||||
* (these can be sanitized by gst_riff_create_audio_caps()
|
||||
*/
|
||||
if (header->blockalign >
|
||||
header->channels * (guint) ceil (header->size / 8.0))
|
||||
goto invalid_blockalign;
|
||||
|
||||
wav->format = header->format;
|
||||
wav->rate = header->rate;
|
||||
wav->channels = header->channels;
|
||||
|
@ -1102,6 +1098,10 @@ gst_wavparse_stream_headers (GstWavParse * wav)
|
|||
wav->bps = 0;
|
||||
break;
|
||||
}
|
||||
case GST_RIFF_WAVE_FORMAT_PCM:
|
||||
if (wav->blockalign > wav->channels * (guint) ceil (wav->depth / 8.0))
|
||||
goto invalid_blockalign;
|
||||
/* fall through */
|
||||
default:
|
||||
if (wav->av_bps > wav->blockalign * wav->rate)
|
||||
goto invalid_bps;
|
||||
|
@ -1317,7 +1317,6 @@ invalid_blockalign:
|
|||
("Stream claims blockalign = %u, which is more than %u - invalid data",
|
||||
header->blockalign,
|
||||
header->channels * (guint) ceil (header->size / 8.0)));
|
||||
g_free (header);
|
||||
g_free (codec_name);
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue