]> git.sur5r.net Git - openldap/commitdiff
ITS#5748
authorQuanah Gibson-Mount <quanah@openldap.org>
Mon, 10 Nov 2008 20:00:10 +0000 (20:00 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 10 Nov 2008 20:00:10 +0000 (20:00 +0000)
CHANGES
libraries/liblutil/tavl.c

diff --git a/CHANGES b/CHANGES
index 6c600a049f83a04871b5f3a8f6afe865208ce221..49bdce9756682102c4a130acee5192c0c1f5202d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@ OpenLDAP 2.4 Change Log
 
 OpenLDAP 2.4.13 Engineering
        Fixed liblutil hex conversion (ITS#5699)
+       Fixed liblutil returning undefined data (ITS#5748)
        Fixed libldap error code return (ITS#5762)
        Fixed slapd config backend olcLogFile support (ITS#5765)
        Added slapd dn.this ACL limits (ITS#5734)
index 403fa11f47e3d7b2bcb993c90381dc863b222d71..d64474fe943e33c54f5a16d734261f1831c3d5b1 100644 (file)
@@ -448,13 +448,13 @@ tavl_free( Avlnode *root, AVL_FREE dfree )
 /*
  * tavl_find2 - returns Avlnode instead of data pointer.
  * tavl_find3 - as above, but returns Avlnode even if no match is found.
- *                             also return the last comparison result in ret.
+ *                             also set *ret = last comparison result, or -1 if root == NULL.
  */
 Avlnode *
 tavl_find3( Avlnode *root, const void *data, AVL_CMP fcmp, int *ret )
 {
-       int     cmp, dir;
-       Avlnode *prev;
+       int     cmp = -1, dir;
+       Avlnode *prev = root;
 
        while ( root != 0 && (cmp = (*fcmp)( data, root->avl_data )) != 0 ) {
                prev = root;