Author: jra Date: 2007-01-16 18:05:37 +0000 (Tue, 16 Jan 2007) New Revision: 20838
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20838 Log: Small fix from [EMAIL PROTECTED] to fix null pointer deref. Jeremy Modified: branches/SAMBA_3_0/source/lib/adt_tree.c branches/SAMBA_3_0_24/source/lib/adt_tree.c Changeset: Modified: branches/SAMBA_3_0/source/lib/adt_tree.c =================================================================== --- branches/SAMBA_3_0/source/lib/adt_tree.c 2007-01-16 17:48:59 UTC (rev 20837) +++ branches/SAMBA_3_0/source/lib/adt_tree.c 2007-01-16 18:05:37 UTC (rev 20838) @@ -334,7 +334,7 @@ void* pathtree_find( SORTED_TREE *tree, char *key ) { - char *keystr, *base, *str, *p; + char *keystr, *base = NULL, *str = NULL, *p; TREE_NODE *current; void *result = NULL; @@ -383,7 +383,8 @@ trim_tree_keypath( p, &base, &str ); DEBUG(11,("pathtree_find: [loop] base => [%s], new_path => [%s]\n", - base, str)); + base ? base : "", + str ? str : "")); /* iterate to the next child */ Modified: branches/SAMBA_3_0_24/source/lib/adt_tree.c =================================================================== --- branches/SAMBA_3_0_24/source/lib/adt_tree.c 2007-01-16 17:48:59 UTC (rev 20837) +++ branches/SAMBA_3_0_24/source/lib/adt_tree.c 2007-01-16 18:05:37 UTC (rev 20838) @@ -334,7 +334,7 @@ void* pathtree_find( SORTED_TREE *tree, char *key ) { - char *keystr, *base, *str, *p; + char *keystr, *base = NULL, *str = NULL, *p; TREE_NODE *current; void *result = NULL; @@ -383,7 +383,8 @@ trim_tree_keypath( p, &base, &str ); DEBUG(11,("pathtree_find: [loop] base => [%s], new_path => [%s]\n", - base, str)); + base ? base : "", + str ? str : "")); /* iterate to the next child */