]> git.sur5r.net Git - openldap/blobdiff - libraries/liblber/io.c
ber_flatten must return -1 on unmatched "{" "}" (ITS#6764)
[openldap] / 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;