After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740765 - lua-factory: Fix use-after-free
lua-factory: Fix use-after-free
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: plugins
unspecified
Other All
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2014-11-26 16:50 UTC by Bastien Nocera
Modified: 2014-11-27 00:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
lua-factory: Fix use-after-free (1.07 KB, patch)
2014-11-26 16:50 UTC, Bastien Nocera
needs-work Details | Review
lua-factory: Fix use-after-free (1.29 KB, patch)
2014-11-26 22:03 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2014-11-26 16:50:26 UTC
.
Comment 1 Bastien Nocera 2014-11-26 16:50:29 UTC
Created attachment 291570 [details] [review]
lua-factory: Fix use-after-free

When the key type isn't handled, we try to print the key name. Better
for it not to be freed when we do that.
Comment 2 Victor Toso 2014-11-26 17:44:55 UTC
Review of attachment 291570 [details] [review]:

You still need to g_free the key_name after the GRL_DEBUG (before the continue)... or you could use the lua_tostring (L, -1) to get the key_name in the top of the stack.
Comment 3 Bastien Nocera 2014-11-26 22:03:49 UTC
Created attachment 291601 [details] [review]
lua-factory: Fix use-after-free

When the key type isn't handled, we try to print the key name. Better
for it not to be freed when we do that.
Comment 4 Victor Toso 2014-11-26 22:37:59 UTC
Review of attachment 291601 [details] [review]:

looks fine
Comment 5 Victor Toso 2014-11-26 23:50:03 UTC
Review of attachment 291601 [details] [review]:

pushed