[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Use of uninitialized pointer in memory.c (ITS#2142)
Fixed in HEAD and OPENLDAP_REL_ENG_2_1 (available via
AnonCVS). Please test. Thanks, Kurt
At 06:53 AM 2002-10-17, dana@research.telcordia.com wrote:
>Full_Name: Dana Chee
>Version: 2.1.6
>OS: Linux 2.4
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (207.3.231.80)
>
>
>In liblber/memory.c, the function ber_bvarray_add is using an uninitialized
>pointer
>(I think the real problem is an extra '*').
>
> BerVarray *atmp;
> BER_MEM_VALID( a );
>
> for ( n = 0; *a != NULL && (*a)[n].bv_val != NULL; n++ ) {
> ; /* just count them */
> }
>
> if (bv == NULL) {
> return n;
> }
>
> *atmp = (BerValue *) LBER_REALLOC( (char *) *a,
> (n + 2) * sizeof(BerValue) );
>
>I think *atmp should be just atmp.
>
>Thanks