[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: slapd crashes when processing zero-length objectclass (ITS#882)



That appears to be an appropriate fix.  Committed to HEAD.
Kurt

At 02:55 PM 11/9/00 +0000, cerdeira@sl.pt wrote:
>Full_Name: J. Cameijo Cerdeira
>Version: 2.0.7
>OS: Linux
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (212.55.140.11)
>
>
>Hello,
>
>I've managed to crash slapd when adding an entry which has a zero-length
>objectclass.
>Apparently this bug boils down to an invalid check in the function oidValidate.
>The following patch seems to solve the problem, but i'm not sure it doesn't
>have
>side effects.
>
>--- schema_init.c.orig  Thu Nov  9 14:49:49 2000
>+++ schema_init.c       Thu Nov  9 14:50:28 2000
>@@ -1782,7 +1782,7 @@
> {
>        ber_len_t i;
> 
>-       if( val->bv_len == 0 ) return 0;
>+       if( val->bv_len == 0 ) return LDAP_INVALID_SYNTAX;
> 
>        if( OID_LEADCHAR(val->bv_val[0]) ) {
>                int dot = 0;
>
>
>MTIA,
>JCC