Search
SailfishOS Open Build Service
>
Projects
>
home:sledge
:
branches:nemo:devel:hw:ti:omap4:common
>
gst-plugins-base
> 0006-fix-a-small-typo.-need-to-use-the-smaller-of-new_wid.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0006-fix-a-small-typo.-need-to-use-the-smaller-of-new_wid.patch of Package gst-plugins-base
From 005ccc621cfdf9f21e8ee10b84af3d619f2c00c7 Mon Sep 17 00:00:00 2001 From: Rob Clark <rob@ti.com> Date: Wed, 19 Aug 2009 15:33:50 -0500 Subject: [PATCH 06/38] fix a small typo.. need to use the smaller of {new_width, orig_width} for the line-by-line copy to avoid overwriting past end of buffer --- gst/stride/gststridetransform.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/stride/gststridetransform.c b/gst/stride/gststridetransform.c index adc22ce..ea52500 100644 --- a/gst/stride/gststridetransform.c +++ b/gst/stride/gststridetransform.c @@ -331,7 +331,7 @@ stridemove (guchar *new_buf, guchar *orig_buf, gint new_width, gint orig_width, } } else { for (row=0; row<height; row++) { - memmove (new_buf+(new_width*row), orig_buf+(orig_width*row), orig_width); + memmove (new_buf+(new_width*row), orig_buf+(orig_width*row), new_width); } } } @@ -440,7 +440,9 @@ gst_stride_transform_transform (GstBaseTransform *base, { GstStrideTransform *self = GST_STRIDE_TRANSFORM (base); - GST_DEBUG_OBJECT (self, "inbuf=%p, outbuf=%p", inbuf, outbuf); + GST_DEBUG_OBJECT (self, "inbuf=%p (size=%d), outbuf=%p (size=%d)", + inbuf, GST_BUFFER_SIZE (inbuf), + outbuf, GST_BUFFER_SIZE (outbuf)); if (self->in_rowstride && self->out_rowstride) { GST_DEBUG_OBJECT (self, "not implemented"); // TODO -- 1.7.5.4