Fix: flt.lttng-utils.debug-info: ".debug" extension not appended
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 24 Apr 2019 14:54:31 +0000 (10:54 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 May 2019 22:19:39 +0000 (18:19 -0400)
commit7d18de7b5c2ff4f91dda92d12005e709f61c0711
treeec4da1006f635e6f143fb1cdfddda8c4998d5492
parent1d4afa5f4367825e5d7b0bd9846354319f64027f
Fix: flt.lttng-utils.debug-info: ".debug" extension not appended

Issue
=====
The g_strconcat() function returns a newly allocated string and does not
change the string in place as the code seems to assume. This results in
the call to g_strconcat() having no effects. Because of this, the
".debug" extension is not appended to the file name resulting in a
failure find the file on the file system.

Ignoring the return value of this call also results in the leaking of
the resulting char array.

Solution
========
Use g_snprintf() instead to concatenate the file name and its extension.

Known drawbacks
===============
None.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
plugins/lttng-utils/debug-info/bin-info.c
This page took 0.024274 seconds and 4 git commands to generate.