]> git.sur5r.net Git - openldap/commitdiff
ITS#3404, fix uninit'd ctrl fields
authorHoward Chu <hyc@openldap.org>
Fri, 3 Dec 2004 17:28:33 +0000 (17:28 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 3 Dec 2004 17:28:33 +0000 (17:28 +0000)
servers/slapd/controls.c

index 76e470efe63a388c122593fdc3266596b609ae4b..688e7266072a9472527b4fabc9687f214cf2672b 100644 (file)
@@ -523,6 +523,8 @@ int get_ctrls(
 
                        c->ldctl_iscritical = (crit != 0);
                        tag = ber_peek_tag( ber, &len );
+               } else {
+                       c->ldctl_iscritical = 0;
                }
 
                if( tag == LBER_OCTETSTRING ) {
@@ -539,6 +541,8 @@ int get_ctrls(
                                rs->sr_text = "decoding controls error";
                                goto return_results;
                        }
+               } else {
+                       BER_BVZERO( &c->ldctl_value );
                }
 
                Debug( LDAP_DEBUG_TRACE,