Bug 18856
Summary: | gtk_clist_get_text() causes segfault | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Sean Dilda <smdilda> | ||||
Component: | gtk+ | Assignee: | Owen Taylor <otaylor> | ||||
Status: | CLOSED NOTABUG | QA Contact: | Dale Lovelace <dale> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 7.0 | CC: | katzj | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2000-10-16 15:20:49 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Sean Dilda
2000-10-10 22:03:36 UTC
Created attachment 4004 [details]
This is the sample code that will work in RH62, but not RH70
gchar **celltext; [...] gtk_clist_get_text(GTK_CLIST(clist), row, 0, celltext); You are telling GTK+ to store the text in the location pointed to by celltext, but celltext is unitialized, so you are telling GTK+ to store it in random memory. If it worked with 6.2 it was complete and utter coincidence. Try: gchar *celltext; gtk_clist_get_text(GTK_CLIST(clist), row, 0, &celltext); To avoid problems like this, you should * Compile with -Wall * Believe the warnings * Read up a bit on pointers |