From: Pierangelo Masarati Date: Mon, 26 Feb 2007 09:50:19 +0000 (+0000) Subject: detect braindead entries (e.g. from back-perl, ITS#4845,ITS#4852) X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~642 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2271fb463636428ff3941810794fce62ca28e703;p=openldap detect braindead entries (e.g. from back-perl, ITS#4845,ITS#4852) --- diff --git a/servers/slapd/entry.c b/servers/slapd/entry.c index dda4e18502..7f1461d24f 100644 --- a/servers/slapd/entry.c +++ b/servers/slapd/entry.c @@ -166,6 +166,11 @@ str2entry2( char *s, int checkvals ) break; } i++; + if (i >= lines) { + Debug( LDAP_DEBUG_TRACE, + "<= str2entry ran past end of entry\n", 0, 0, 0 ); + goto fail; + } rc = ldif_parse_line2( s, type+i, vals+i, &freev ); freeval[i] = freev;