]> git.sur5r.net Git - openldap/commitdiff
ber_flatten must return -1 on unmatched "{" "}" (ITS#6764)
authorPierangelo Masarati <ando@openldap.org>
Sat, 1 Jan 2011 16:06:45 +0000 (16:06 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 1 Jan 2011 16:06:45 +0000 (16:06 +0000)
libraries/liblber/io.c

index d84c1907cd0bcfbce49bbd62c3158419f5914cc4..e2288fbf986b45a1e7ce51a347bf768782e2527f 100644 (file)
@@ -390,6 +390,11 @@ int ber_flatten2(
                return -1;
        }
 
+       /* unmatched "{" and "}" */
+       if ( ber->ber_sos_ptr != NULL ) {
+               return -1;
+       }
+
        if ( ber == NULL ) {
                /* ber is null, create an empty berval */
                bv->bv_val = NULL;