From: ludo@gnu.org (Ludovic Courtès)
To: rennes@openmailbox.org
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: Add fontconfig-path-max.
Date: Mon, 04 Jul 2016 10:21:16 +0200 [thread overview]
Message-ID: <877fd1hkzn.fsf@gnu.org> (raw)
In-Reply-To: <7b313a7566d04932f94fb33e7a63c222@openmailbox.org> (rennes@openmailbox.org's message of "Sat, 18 Jun 2016 14:02:51 -0500")
Oops, I spoke too fast.
rennes@openmailbox.org skribis:
> +++ b/gnu/packages/patches/fontconfig-fcdefault.patch
> @@ -0,0 +1,23 @@
> +This patch replaces the use of macro PATH_MAX by *buf constant,
> +which allows dynamic memory allocation.
> +
> +---
> + src/fcdefault.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/fcdefault.c b/src/fcdefault.c
> +index 6647a8f..8e2094f 100644
> +--- a/src/fcdefault.c
> ++++ b/src/fcdefault.c
> +@@ -150,7 +150,7 @@ retry:
> + # if defined (HAVE_GETEXECNAME)
> + const char *p = getexecname ();
> + # elif defined (HAVE_READLINK)
> +- char buf[PATH_MAX + 1];
> ++ char *buf;
[...]
> + struct stat statb;
> +- char f[PATH_MAX + 1];
> ++ char *f;
With these changes, the code compiles but will crash at run time,
because ‘f’ and ‘buf’ are dangling pointers.
We should instead use ‘01_path_max.patch’ from
<http://http.debian.net/debian/pool/main/f/fontconfig/fontconfig_2.11.0-6.3.debian.tar.xz>.
(In general, for PATH_MAX issues, Debian very likely already has a
patch.)
Thanks,
Ludo’.
next prev parent reply other threads:[~2016-07-04 8:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-18 19:02 [PATCH] gnu: Add fontconfig-path-max rennes
2016-07-03 22:24 ` Manolis Ragkousis
2016-07-04 4:02 ` rennes
2016-07-04 7:55 ` Manolis Ragkousis
2016-07-05 1:46 ` rennes
2016-07-04 8:16 ` Ludovic Courtès
2016-07-04 8:21 ` Ludovic Courtès [this message]
2016-07-05 1:26 ` rennes
2016-07-05 8:51 ` Ludovic Courtès
2016-07-12 14:08 ` rennes
2016-07-12 14:25 ` rennes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877fd1hkzn.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=rennes@openmailbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).