+2008-05-06 Sebastian Dröge <slomo@circular-chaos.org>
+
+ * gst/gstpad.c: (gst_pad_alloc_buffer_full):
+ * libs/gst/base/gstbasetransform.c:
+ (gst_base_transform_prepare_output_buffer):
+ Don't allow negative sizes when allocating new buffers.
+ Fixes bug #461253.
+
2008-05-05 Tim-Philipp Müller <tim.muller at collabora co uk>
Patch by: Sjoerd Simons <sjoerd at luon net>
}
}
+/* FIXME 0.11: size should be unsigned */
static GstFlowReturn
gst_pad_alloc_buffer_full (GstPad * pad, guint64 offset, gint size,
GstCaps * caps, GstBuffer ** buf, gboolean setcaps)
g_return_val_if_fail (GST_IS_PAD (pad), GST_FLOW_ERROR);
g_return_val_if_fail (GST_PAD_IS_SRC (pad), GST_FLOW_ERROR);
g_return_val_if_fail (buf != NULL, GST_FLOW_ERROR);
+ g_return_val_if_fail (size >= 0, GST_FLOW_ERROR);
GST_DEBUG_OBJECT (pad, "offset %" G_GUINT64_FORMAT ", size %d", offset, size);
*
* MT safe.
*/
+
+/* FIXME 0.11: size should be unsigned */
GstFlowReturn
gst_pad_alloc_buffer (GstPad * pad, guint64 offset, gint size, GstCaps * caps,
GstBuffer ** buf)
*
* MT safe.
*/
+
+/* FIXME 0.11: size should be unsigned */
GstFlowReturn
gst_pad_alloc_buffer_and_set_caps (GstPad * pad, guint64 offset, gint size,
GstCaps * caps, GstBuffer ** buf)
* inbuf, the caller should be prepared for this and perform
* appropriate refcounting.
*/
+
+/* FIXME 0.11: out_size should be unsigned */
static GstFlowReturn
gst_base_transform_prepare_output_buffer (GstBaseTransform * trans,
GstBuffer * in_buf, gint out_size, GstCaps * out_caps, GstBuffer ** out_buf)
GstFlowReturn ret = GST_FLOW_OK;
gboolean copy_inbuf = FALSE;
+ g_return_val_if_fail (out_size >= 0, GST_FLOW_ERROR);
+
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
/* we cannot reconfigure the element yet as we are still processing