From: Michael Smith Date: Thu, 27 Mar 2008 15:26:38 +0000 (+0000) Subject: gst/gdp/gstgdpdepay.c: Check the body CRC (if set) when depayloading. X-Git-Tag: RELEASE-0_10_20~191 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=670d6cd1e4a49d4bf1784fd92f65f97a72ada646;p=platform%2Fupstream%2Fgst-plugins-base.git gst/gdp/gstgdpdepay.c: Check the body CRC (if set) when depayloading. Original commit message from CVS: * gst/gdp/gstgdpdepay.c: (gst_gdp_depay_chain): Check the body CRC (if set) when depayloading. Fixes #522401. --- diff --git a/ChangeLog b/ChangeLog index 5f4556f..a75ef96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-27 Michael Smith + + * gst/gdp/gstgdpdepay.c: (gst_gdp_depay_chain): + Check the body CRC (if set) when depayloading. + Fixes #522401. + 2008-03-24 Tim-Philipp Müller * ext/pango/gsttextoverlay.c: (gst_text_overlay_class_init): diff --git a/gst/gdp/gstgdpdepay.c b/gst/gdp/gstgdpdepay.c index 16f6a76..1341b37 100644 --- a/gst/gdp/gstgdpdepay.c +++ b/gst/gdp/gstgdpdepay.c @@ -287,6 +287,12 @@ gst_gdp_depay_chain (GstPad * pad, GstBuffer * buffer) } else { goto wrong_type; } + + if (!gst_dp_validate_payload (GST_DP_HEADER_LENGTH, this->header, + gst_adapter_peek (this->adapter, this->payload_length))) { + goto payload_validate_error; + } + break; } case GST_GDP_DEPAY_STATE_BUFFER: @@ -392,6 +398,13 @@ header_validate_error: ret = GST_FLOW_ERROR; goto done; } +payload_validate_error: + { + GST_ELEMENT_ERROR (this, STREAM, DECODE, (NULL), + ("GDP packet payload does not validate")); + ret = GST_FLOW_ERROR; + goto done; + } wrong_type: { GST_ELEMENT_ERROR (this, STREAM, DECODE, (NULL),