[Geany-devel] configuration save: utils_build_path?
elextr at xxxxx
Sun Apr 10 11:04:22 UTC 2011
On 10 April 2011 20:53, Lex Trotman <elextr at gmail.com> wrote:
> On 10 April 2011 20:16, Dimitar Zhekov <dimitar.zhekov at gmail.com> wrote:
>> On Sun, 10 Apr 2011 10:22:36 +1000
>> Lex Trotman <elextr at gmail.com> wrote:
>>> On 10 April 2011 03:48, Dimitar Zhekov <dimitar.zhekov at gmail.com> wrote:
>>> > What is the reason for configuration_save() and
>>> > configuration_save_default_session() to use g_strconcat() instead of
>>> > utils_build_path()? [...]
>>> The problem is that utils_build_path is *waaaaay* unsafe, it re-uses a
>>> single buffer so it can't be called again before the caller has
>>> finished with the result, unless the caller copies the result.
>> I know, my question was is there a known conflict...
> Yeah well, even if its ok today, whats the chances someone forgets and
> makes a change tomorrow ... like me :-)
On thinking about it some more, if the g_strconcat worries you, do as
the comment on util_build_path says, use g_build_path :-)
More information about the Devel