[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Glib->log() and %-style format strings
- From: "muppet" <scott asofyet org>
- To: gtk-perl-list gnome org
- Subject: Re: Glib->log() and %-style format strings
- Date: Mon, 2 Feb 2009 17:27:06 -0500 (EST)
Torsten Schoenfeld wrote:
> Aloha,
>
> this always produces a segmentation fault on my machine:
>
> perl -MGlib -e'Glib->log(q/Test/, qw/warning/, q(%s %s));'
>
> The reason is that we pass the message string ("%s %s" in this case) unaltered
> down to g_log():
>
> g_log (log_domain, SvGLogLevelFlags (log_level), message);
Well, that should be
g_log (log_domina, SvGLogLevelFlags (log_level), "%s", message);
in order to protect against nasty embedded % chars.
I don't think that g_log() provides any formatting features that perl doesn't
already trump.
(I'm surprised, i thought we'd fixed that long ago.)
--
muppet <scott at asofyet dot org>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]