version 1.64, 2001/12/04 05:10:10
|
version 1.65, 2001/12/04 05:14:16
|
Line 1
|
Line 1
|
/* decode.c - ber input decoding routines */ |
/* decode.c - ber input decoding routines */ |
/* $OpenLDAP: pkg/ldap/libraries/liblber/decode.c,v 1.63 2001/11/04 16:50:16 kurt Exp $ */ |
/* $OpenLDAP: pkg/ldap/libraries/liblber/decode.c,v 1.64 2001/12/04 05:10:10 kurt Exp $ */ |
/* |
/* |
* Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved. |
* Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved. |
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file |
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file |
Line 590 ber_scanf ( BerElement *ber,
|
Line 590 ber_scanf ( BerElement *ber,
|
tag != LBER_DEFAULT && rc != LBER_DEFAULT; |
tag != LBER_DEFAULT && rc != LBER_DEFAULT; |
tag = ber_next_element( ber, &len, last ) ) |
tag = ber_next_element( ber, &len, last ) ) |
{ |
{ |
void *save = *sss; |
char **save = *sss; |
|
|
*sss = (char **) LBER_REALLOC( *sss, |
*sss = (char **) LBER_REALLOC( *sss, |
(j + 2) * sizeof(char *) ); |
(j + 2) * sizeof(char *) ); |
|
|
if( *sss == NULL ) { |
if( *sss == NULL ) { |
save[j] = NULL; |
save[j] = NULL; |
ber_memvfree( save ); |
ber_memvfree( (void **) save ); |
rc = LBER_DEFAULT; |
rc = LBER_DEFAULT; |
goto breakout; |
goto breakout; |
} |
} |
Line 616 ber_scanf ( BerElement *ber,
|
Line 616 ber_scanf ( BerElement *ber,
|
tag != LBER_DEFAULT && rc != LBER_DEFAULT; |
tag != LBER_DEFAULT && rc != LBER_DEFAULT; |
tag = ber_next_element( ber, &len, last ) ) |
tag = ber_next_element( ber, &len, last ) ) |
{ |
{ |
void *save = *bv; |
struct berval **save = *bv; |
|
|
*bv = (struct berval **) LBER_REALLOC( *bv, |
*bv = (struct berval **) LBER_REALLOC( *bv, |
(j + 2) * sizeof(struct berval *) ); |
(j + 2) * sizeof(struct berval *) ); |
Line 744 breakout:
|
Line 744 breakout:
|
case 'v': /* sequence of strings */ |
case 'v': /* sequence of strings */ |
sss = va_arg( ap, char *** ); |
sss = va_arg( ap, char *** ); |
if ( *sss ) { |
if ( *sss ) { |
ber_memvfree( *sss ); |
ber_memvfree( (void **) *sss ); |
*sss = NULL; |
*sss = NULL; |
} |
} |
break; |
break; |