Menu

#46 gq_ldap_explode_dn() segfaults on some machines

closed-fixed
nobody
None
5
2006-04-07
2005-02-14
No

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)

Discussion

  • Ashley Burston

    Ashley Burston - 2005-04-15

    Logged In: YES
    user_id=369199

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

     
  • Nobody/Anonymous

    Logged In: NO

    It works right for me too, under Gentoo Linux

     
  • Sven Herzberg

    Sven Herzberg - 2006-03-31

    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.

     
  • Sven Herzberg

    Sven Herzberg - 2006-04-01

    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.

     
  • Sven Herzberg

    Sven Herzberg - 2006-04-01
    • status: open --> closed-works-for-me
     
  • Luca Scamoni

    Luca Scamoni - 2006-04-03

    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.

     
  • Sven Herzberg

    Sven Herzberg - 2006-04-05
    • status: closed-works-for-me --> open
     
  • Sven Herzberg

    Sven Herzberg - 2006-04-05

    Logged In: YES
    user_id=76622

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

     
  • Sven Herzberg

    Sven Herzberg - 2006-04-05
    • summary: GQ Segfault --> gq_ldap_explode_dn() segfaults on some machines
     
  • Sven Herzberg

    Sven Herzberg - 2006-04-05

    Logged In: YES
    user_id=76622

    Renaming the bug to be more obvious.

     
  • Sven Herzberg

    Sven Herzberg - 2006-04-06

    Proposed patch

     
  • Sven Herzberg

    Sven Herzberg - 2006-04-06

    Logged In: YES
    user_id=76622

    Proposed patch.

     
  • Stephan Sachse

    Stephan Sachse - 2006-04-07

    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

     
  • Sven Herzberg

    Sven Herzberg - 2006-04-07

    Proposed patch (second attempt)

     
  • Sven Herzberg

    Sven Herzberg - 2006-04-07

    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).

     
  • Stephan Sachse

    Stephan Sachse - 2006-04-07

    Logged In: YES
    user_id=533692

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

     
  • Sven Herzberg

    Sven Herzberg - 2006-04-07

    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

     
  • Sven Herzberg

    Sven Herzberg - 2006-04-07
    • status: open --> closed-fixed
     

Log in to post a comment.