From: Pierangelo Masarati Date: Sat, 29 Nov 2003 17:58:49 +0000 (+0000) Subject: fix uninitialized buffer (ITS#2849) X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~339 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=99a316497216f28c1d403425f93996c9f33c533c;p=openldap fix uninitialized buffer (ITS#2849) --- diff --git a/servers/slapd/back-meta/cache-search.c b/servers/slapd/back-meta/cache-search.c index 8c7678d7b9..c0d0beda11 100644 --- a/servers/slapd/back-meta/cache-search.c +++ b/servers/slapd/back-meta/cache-search.c @@ -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;