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 669696 - Use of freed memory in dh_assistant_view_set_link()
Use of freed memory in dh_assistant_view_set_link()
Status: RESOLVED FIXED
Product: devhelp
Classification: Applications
Component: General
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: devhelp-maint
devhelp-maint
Depends on:
Blocks:
 
 
Reported: 2012-02-08 18:48 UTC by Carlos Garcia Campos
Modified: 2012-02-17 18:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
assistant: Fix use of freed memory (1.31 KB, patch)
2012-02-08 18:48 UTC, Carlos Garcia Campos
committed Details | Review

Description Carlos Garcia Campos 2012-02-08 18:48:38 UTC
Created attachment 207135 [details] [review]
assistant: Fix use of freed memory

In dh_assistant_view_set_link()

anchor = strrchr (uri, '#');
if (anchor) {
                 filename = g_strndup (uri, anchor - uri);
                 anchor++;
                 g_free (uri);
}

anchor is const char, and it's used after uri has been freed
Comment 1 Carlos Garcia Campos 2012-02-17 18:53:00 UTC
Pushed.