]> git.sur5r.net Git - openldap/commitdiff
detect braindead entries (e.g. from back-perl, ITS#4845,ITS#4852)
authorPierangelo Masarati <ando@openldap.org>
Mon, 26 Feb 2007 09:50:19 +0000 (09:50 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 26 Feb 2007 09:50:19 +0000 (09:50 +0000)
servers/slapd/entry.c

index dda4e185023f86f3a4f92125f5d595eba0397611..7f1461d24f2ac544c84475ac536269ca4014d5ac 100644 (file)
@@ -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;