]> git.sur5r.net Git - openldap/commitdiff
fix uninitialized buffer (ITS#2849)
authorPierangelo Masarati <ando@openldap.org>
Sat, 29 Nov 2003 17:58:49 +0000 (17:58 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 29 Nov 2003 17:58:49 +0000 (17:58 +0000)
servers/slapd/back-meta/cache-search.c

index 8c7678d7b902dd3165e11ed3afd07e43dc855cf8..c0d0beda11249219f53f141229d942ea869c267d 100644 (file)
@@ -850,11 +850,11 @@ meta_create_entry (
        Attribute               *attr, *soc_attr, **attrp;
        struct berval   dummy = { 0, NULL };
        struct berval   *bv, bdn;
-       const char              *text;
+       const char              *text = NULL;
        char*                   ename = NULL; 
        struct berval   sc = { 0, NULL };
-       char*                   textbuf;
-       size_t                  textlen;
+       char                    textbuf[SLAP_TEXT_BUFLEN];
+       size_t                  textlen = sizeof(textbuf);
 
        if ( ber_scanf( &ber, "{m{", &bdn ) == LBER_ERROR ) {
                result->type = CREATE_ENTRY_ERR;