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

Re: slapd chokes on PROTOS test suite (ITS#2275)



At 03:08 AM 1/20/2003, rhafer@suse.de wrote:
>Full_Name: Ralf Haferkamp
>Version: 2.1.12, HEAD
>OS: SuSE Linux 8.1
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (212.95.100.96)
>
>
>I recently ran the PROTOS test suite:
>    http://www.ee.oulu.fi/research/ouspg/protos/testing/c06/ldapv3/
>against the latest stable release. Some testcases crashed the server. 
>The first test that failed was #1504 of c06-ldapv3-enc-r1.jar. The folling patch
>should fix the problem:
>
>--- libraries/liblber/io.c      2003/01/20 08:21:58     1.1
>+++ libraries/liblber/io.c      2003/01/20 08:59:08
>@@ -492,6 +492,7 @@
>                        unsigned char *p = (unsigned char *)ber->ber_ptr;
>                        tag = *p++;
>                        if ((tag & LBER_BIG_TAG_MASK) == LBER_BIG_TAG_MASK) {
>+                               int i;
>                                for (i=1; (char *)p<ber->ber_rwptr; i++,p++) {
>                                        tag <<= 8;
>                                        tag |= *p;

I think a more appropriate fix would be to rename the outer variable i.
Also, the inner i should likely be of ber_len_t, not int.  But I need
to finish my morning coke before attempting a fix here...