[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Some bugs and fixes to Stable
Some quick patches, described at top of each page.
They were very easy to find, just compile with
CC="gcc -O -Wuninitialized"
or -Wformat or whatever.
There are more -Wuninitialized warnings; I only report the ones that also
were easy to see were wrong (without scanning the code too much).
Bugs - I don't know what is intended here. Replace '???' with something.
--- ./servers/slapd/back-shell/bind.c~ Wed Sep 16 02:32:19 1998
+++ ./servers/slapd/back-shell/bind.c Wed Sep 16 04:19:28 1998
@@ -25,5 +25,5 @@
send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
"bind not implemented" );
- return;
+ return ???;
}
@@ -32,5 +32,5 @@
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
"could not fork/exec" );
- return;
+ return ???;
}
--- ./servers/slapd/tools/centipede.c~ Wed Sep 16 02:32:20 1998
+++ ./servers/slapd/tools/centipede.c Wed Sep 16 04:29:26 1998
@@ -357,4 +357,7 @@
s = ldapsrcurl + 7;
}
+ else {
+ ???;
+ }
if ( (s2 = strchr( s, '/' )) == NULL ) {
ldapbase = strdup( s );
@@ -866,4 +869,7 @@
if ( strncmp( ldapdesturl, "ldap://", 7 ) == 0 ) {
s = ldapdesturl + 7;
+ }
+ else {
+ ???;
}
if ( (s2 = strchr( s, '/' )) == NULL ) {
--- ./servers/slapd/entry.c~ Wed Sep 16 02:32:16 1998
+++ ./servers/slapd/entry.c Wed Sep 16 04:23:13 1998
@@ -82,4 +82,7 @@
a = NULL;
}
+ else {
+ /* ??? What should nvals be here? */
+ }
if ( strcasecmp( type, "dn" ) == 0 ) {
if ( e->e_dn != NULL ) {
Declare missing function args.
(Missing char* args can cause faulure if char* is wider than int.)
--- ./clients/gopher/setproctitle.c~ Wed Sep 16 02:31:49 1998
+++ ./clients/gopher/setproctitle.c Wed Sep 16 04:09:08 1998
@@ -22,4 +22,5 @@
setproctitle( fmt, a, b, c )
char *fmt;
+char *a, *b, *c;
{
static char *endargv = (char *)0;
--- ./clients/ud/util.c~ Wed Sep 16 02:31:51 1998
+++ ./clients/ud/util.c Wed Sep 16 04:12:07 1998
@@ -482,4 +482,5 @@
char * code_to_str(i)
+int i;
{
switch(i) {
dn was computed after it was needed.
--- ./clients/gopher/go500gw.c~ Wed Sep 16 02:31:48 1998
+++ ./clients/gopher/go500gw.c Wed Sep 16 04:08:19 1998
@@ -777,6 +777,6 @@
e = ldap_first_entry( ld, res );
oc = ldap_get_values( ld, e, "objectClass" );
+ dn = ldap_get_dn( ld, e );
if ( isnonleaf( ld, oc, dn ) ) {
- dn = ldap_get_dn( ld, e );
rc = do_menu( ld, fp, dn );
Just remove a warning: computed value is unused.
--- ./libraries/libldif/line64.c~ Wed Sep 16 02:32:06 1998
+++ ./libraries/libldif/line64.c Wed Sep 16 04:03:48 1998
@@ -184,5 +184,5 @@
break;
}
- *(*next)++;
+ (*next)++;
}
Possible coredump: printf("%s", 0).
--- ./servers/slapd/back-ldbm/search.c~ Wed Sep 16 02:32:18 1998
+++ ./servers/slapd/back-ldbm/search.c Wed Sep 16 04:15:54 1998
@@ -159,6 +159,6 @@
if ( ref->a_vals == NULL ) {
- Debug( LDAP_DEBUG_ANY, "null ref in (%s)\n", 0,
- 0, 0 );
+ Debug( LDAP_DEBUG_ANY, "null ref in (%s)\n",
+ e->e_dn, 0, 0 );
} else {
for ( i = 0; ref->a_vals[i] != NULL; i++ ) {
Typo: `!' instead of `|'.
--- ./servers/slapd/back-ldbm/id2entry.c~ Wed Sep 16 04:17:45 1998
+++ ./servers/slapd/back-ldbm/id2entry.c Wed Sep 16 04:17:55 1998
@@ -42,5 +42,5 @@
/* store it */
flags = LDBM_REPLACE;
- if ( li->li_flush_wrt ) flags != LDBM_SYNC;
+ if ( li->li_flush_wrt ) flags |= LDBM_SYNC;
rc = ldbm_cache_store( db, key, data, flags );
Uninitialized f could be freed.
--- ./servers/slapd/str2filter.c~ Wed Sep 16 02:32:17 1998
+++ ./servers/slapd/str2filter.c Wed Sep 16 04:24:32 1998
@@ -15,5 +15,5 @@
str2filter( char *str )
{
- Filter *f;
+ Filter *f = NULL;
char *end;
--
Hallvard