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 325238 - crash on definition not found (double free)
crash on definition not found (double free)
Status: RESOLVED FIXED
Product: gnome-utils
Classification: Deprecated
Component: gdict
trunk
Other Linux
: Normal critical
: ---
Assigned To: gnome-utils Maintainers
gnome-utils Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-12-29 16:30 UTC by Paolo Borelli
Modified: 2005-12-30 12:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.44 KB, patch)
2005-12-29 16:31 UTC, Paolo Borelli
none Details | Review

Description Paolo Borelli 2005-12-29 16:30:47 UTC
search for a word for which a defintion is not found -> a dialog is popped up. When you close the dialog window->word is freed, when you search again window->word is freed again -> BOOM :)

I don't think there is any need to free when closing the dialog so I took that free() out. (the alternative is to set window->word = NULL after the free).


Along the way I also noticed another buglet: if you press enter when the definition entry is empty "" is looked up in the dictionary and the title is set to "dictionary - ". This is because gtk_entry_get_text never returns NULL so you need to check that *text != '\0'.


patch follows
Comment 1 Paolo Borelli 2005-12-29 16:31:36 UTC
Created attachment 56508 [details] [review]
patch
Comment 2 Emmanuele Bassi (:ebassi) 2005-12-30 12:49:56 UTC
thanks, fixed in HEAD