[Pkg-xfce-devel] Re: could thunar 0.4.0rc1-3 be uploaded to tpu and migrate to testing ?
Hi Yves-Al?xis,
On Tue, Jan 23, 2007 at 04:09:46PM +0100, Yves-Alexis Perez wrote:
> we have received two translations fixes for thunar currently in testing.
> I've prepared a package for tpu (as unstable has thunar 0.5 already).
> There are the two translations patchs, and a little modification to the
> long description.
> Would it be allowed to upload it in tpu, and then have them go to
> testing ?
I don't understand the patch that this includes for a crash.
> --- thunar-0.4.0rc1.orig/debian/patches/02_thunar-vfs-path_uri-list-crash.patch
> +++ thunar-0.4.0rc1/debian/patches/02_thunar-vfs-path_uri-list-crash.patch
> @@ -0,0 +1,36 @@
> +Index: thunar-vfs/thunar-vfs-path.c
> +===================================================================
> +--- thunar-vfs/thunar-vfs-path.c (revision 23810)
> ++++ thunar-vfs/thunar-vfs-path.c (working copy)
> +@@ -1058,21 +1058,28 @@
> + {
> + for (;;)
> + {
> +- /* increase the buffer automatically if required (already including the line break) */
> +- n = thunar_vfs_path_to_uri (lp->data, buffer + bufpos, bufsize - (bufpos + 2), NULL);
> +- if (G_UNLIKELY (n < 0))
> ++ /* determine the size required to store the URI and the line break */
> ++ n = thunar_vfs_path_escape_uri_length (lp->data) + 2;
> ++ if (n > (bufsize - bufpos))
> + {
> ++ /* automatically increase the buffer */
> + bufsize += 512;
> + buffer = g_realloc (buffer, bufsize + 1);
> + continue;
> + }
> +
> ++ /* append the URI to the buffer */
> ++ n = thunar_vfs_path_escape_uri (lp->data, buffer + bufpos);
> ++
> + /* shift the buffer position */
> + bufpos += (n - 1);
> +
> + /* append a line break */
> + buffer[bufpos++] = '\r';
> + buffer[bufpos++] = '\n';
> ++
> ++ /* sanity checks */
> ++ _thunar_vfs_assert (bufpos <= bufsize);
> + break;
> + }
> + }
Why does this code assume the buffer will only need to be increased in 512
byte increments?
If you omit this patch, I'll accept the translation-only fixes in t-p-u;
otherwise more discussion is needed here.
Thanks,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
vorlon@debian.org http://www.debian.org/
Reply to: