Share

GQ LDAP client

Tracker: Bugs

5 gq_ldap_explode_dn() segfaults on some machines - ID: 1122365
Last Update: Comment added ( herzi )

Scenario:
gq1.0-beta1 compiled against OpenLDAP > 2.1.
Right-clicking on an object causes a segfault in
gq_ldap_explode_dn.
Find attached the simple fix (file util.c.patch)


Luca Scamoni ( lscamoni ) - 2005-02-14 13:09

5

Closed

Fixed

Nobody/Anonymous

None

None

Public


Comments ( 12 )




Date: 2006-04-07 21:40
Sender: herziProject Admin

Logged In: YES
user_id=76622

Fixed in CVS HEAD:

2006-04-08 Sven Herzberg <herzi@gnome-de.org>

* src/Makefile.am: allow deprecated functions for now
* src/util.c: fix gq_ldap_explode_dn() for both
OpenLDAP 2.1 and 2.2


Date: 2006-04-07 20:34
Sender: white-

Logged In: YES
user_id=533692

works for me...
no more warnings in src/util.c


Date: 2006-04-07 20:04
Sender: herziProject Admin

Logged In: YES
user_id=76622

Adding a new patch. OpenLDAP > 2.1 users, please check with
this one again and tell me whether you can find warnings (I
checked this for OpenLDAP 2.1 from Debian).


Date: 2006-04-07 17:49
Sender: white-

Logged In: YES
user_id=533692

> 1. Which distribution do you use?

Fedora Core 5

package versions

* openldap-2.3.19-4
* gtk2-2.8.15-1
* glib2-2.10.1-1

> 2. Do you get any warnings from compiling src/util.c?

util.c: In function 'do_ldap_connect':
util.c:126: warning: implicit declaration of function
'ldap_init'
util.c:126: warning: assignment makes pointer from integer
without a cast util.c:182: warning: implicit declaration of
function 'ldap_unbind' util.c:263: warning: implicit
declaration of function 'ldap_simple_bind_s' util.c: In
function 'delete_entry_full':
util.c:714: warning: implicit declaration of function
'ldap_search_s'
util.c:747: warning: implicit declaration of function
'ldap_delete_s'
util.c: In function 'is_leaf_entry':
util.c:1096: warning: implicit declaration of function
'ldap_abandon'
util.c: In function 'get_suffixes':
util.c:1827: warning: implicit declaration of function
'ldap_get_values'
util.c:1827: warning: assignment makes pointer from integer
without a cast util.c:1834: warning: implicit declaration of
function 'ldap_value_free' util.c:1855: warning: assignment
makes pointer from integer without a cast util.c: In
function 'gq_ldap_explode_dn':
util.c:1925: warning: passing argument 2 of 'ldap_str2dn'
from incompatible pointer type
util.c:1940: warning: passing argument 1 of 'ldap_rdn2str'
from incompatible pointer type

> 3. Does the application work for you? (Switch to the
Browse Tab;
> Connect to a server; expand the server node; right
click on any
> DN-Node)

works for me :)

during left click on one DN-node following output on the
terminal for each click

(gq:14697): Gdk-CRITICAL **: gdk_drawable_get_depth:
assertion `GDK_IS_DRAWABLE (drawable)' failed

(gq:14697): Gtk-CRITICAL **: gtk_pixmap_set: assertion
`gdk_colormap_get_visual (gtk_widget_get_colormap
(GTK_WIDGET (pixmap)))->depth == gdk_drawable_get_depth
(GDK_DRAWABLE (val))' failed

(gq:14697): Gdk-CRITICAL **: gdk_drawable_get_depth:
assertion `GDK_IS_DRAWABLE (drawable)' failed

(gq:14697): Gtk-CRITICAL **: gtk_pixmap_set: assertion
`gdk_colormap_get_visual (gtk_widget_get_colormap
(GTK_WIDGET (pixmap)))->depth == gdk_drawable_get_depth
(GDK_DRAWABLE (val))' failed

(gq:14697): Gdk-CRITICAL **: gdk_drawable_get_depth:
assertion `GDK_IS_DRAWABLE (drawable)' failed

(gq:14697): Gtk-CRITICAL **: gtk_pixmap_set: assertion
`gdk_colormap_get_visual (gtk_widget_get_colormap
(GTK_WIDGET (pixmap)))->depth == gdk_drawable_get_depth
(GDK_DRAWABLE (val))' failed

(gq:14697): Gdk-CRITICAL **: gdk_drawable_get_depth:
assertion `GDK_IS_DRAWABLE (drawable)' failed

(gq:14697): Gtk-CRITICAL **: gtk_pixmap_set: assertion
`gdk_colormap_get_visual (gtk_widget_get_colormap
(GTK_WIDGET (pixmap)))->depth == gdk_drawable_get_depth
(GDK_DRAWABLE (val))' failed

btw: new servers are not saved to the config file. i must
add all server
by hand

/stephan


Date: 2006-04-06 13:24
Sender: herziProject Admin

Logged In: YES
user_id=76622

Proposed patch.


Date: 2006-04-05 14:25
Sender: herziProject Admin

Logged In: YES
user_id=76622

Renaming the bug to be more obvious.


Date: 2006-04-05 13:52
Sender: herziProject Admin

Logged In: YES
user_id=76622

Re-opening, as this still appears on some computers.


Date: 2006-04-03 07:38
Sender: lscamoni

Logged In: YES
user_id=991379

It can be. I didn't test HEAD code so other changes could
have obsoleted my patch. It was made against released code
and there, it worked nicely. Feel free to put it aside.


Date: 2006-04-01 17:42
Sender: herziProject Admin

Logged In: YES
user_id=76622

I just tested this patch with current CVS head and I have to
tell you that the current implementation works for me and
that your patch just makes it crash here. Testcase attached.


Date: 2006-03-31 20:32
Sender: herziProject Admin

Logged In: YES
user_id=76622

Thanks for filing and fixing this particular bug. We're
going to review and apply the patch once the CVS servers get
back into action.


Date: 2005-06-24 12:28
Sender: nobody

Logged In: NO

It works right for me too, under Gentoo Linux


Date: 2005-04-15 10:30
Sender: ashley_burston

Logged In: YES
user_id=369199

Verfied this patch on cygwin on windows XP, works for me!


Log in to comment.




Attached Files ( 2 )

Filename Description Download
gq_ldap_explode_dn-fix2.patch Proposed patch (second attempt) Download
patch Proposed patch Download

Changes ( 16 )

Field Old Value Date By
status_id Open 2006-04-07 21:40 herzi
close_date - 2006-04-07 21:40 herzi
resolution_id None 2006-04-07 21:40 herzi
File Added 173801: gq_ldap_explode_dn-fix2.patch 2006-04-07 20:04 herzi
File Deleted 119967: 2006-04-06 13:24 herzi
File Added 173635: patch 2006-04-06 13:24 herzi
File Deleted 173049: 2006-04-06 13:24 herzi
summary GQ Segfault 2006-04-05 14:25 herzi
close_date 2006-04-01 17:42 2006-04-05 13:52 herzi
resolution_id Works For Me 2006-04-05 13:52 herzi
status_id Closed 2006-04-05 13:52 herzi
File Added 173049: main.c 2006-04-01 17:42 herzi
status_id Open 2006-04-01 17:42 herzi
close_date - 2006-04-01 17:42 herzi
resolution_id None 2006-04-01 17:42 herzi
File Added 119967: util.c.patch 2005-02-14 13:09 lscamoni