version 1.58, 2000/10/25 13:35:01
|
version 1.59, 2001/01/17 16:08:44
|
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.57 2000/10/12 19:14:43 gwilliams Exp $ */ |
/* $OpenLDAP: pkg/ldap/libraries/liblber/decode.c,v 1.58 2000/10/25 13:35:01 gwilliams 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 109 ber_skip_tag( BerElement *ber, ber_len_t
|
Line 109 ber_skip_tag( BerElement *ber, ber_len_t
|
|
|
/* |
/* |
* Next, read the length. The first byte contains the length of |
* Next, read the length. The first byte contains the length of |
* the length. If bit 8 is set, the length is the long form, |
* the length. If bit 8 is set, the length is the long form, |
* otherwise it's the short form. We don't allow a length that's |
* otherwise it's the short form. We don't allow a length that's |
* greater than what we can hold in a ber_len_t. |
* greater than what we can hold in a ber_len_t. |
*/ |
*/ |
Line 477 ber_scanf ( BerElement *ber,
|
Line 477 ber_scanf ( BerElement *ber,
|
LDAP_CONST char *fmt_reset; |
LDAP_CONST char *fmt_reset; |
char *last; |
char *last; |
char *s, **ss, ***sss; |
char *s, **ss, ***sss; |
struct berval ***bv, **bvp, *bval; |
struct berval ***bv, **bvp, *bval; |
ber_int_t *i; |
ber_int_t *i; |
int j; |
int j; |
ber_len_t *l; |
ber_len_t *l; |
Line 495 ber_scanf ( BerElement *ber,
|
Line 495 ber_scanf ( BerElement *ber,
|
fmt_reset = fmt; |
fmt_reset = fmt; |
|
|
#ifdef NEW_LOGGING |
#ifdef NEW_LOGGING |
LDAP_LOG(( "LIBLBER", LDAP_LEVEL_ENTRY, "ber_scanf fmt (%s) ber:\n", fmt )); |
LDAP_LOG(( "liblber", LDAP_LEVEL_ENTRY, "ber_scanf fmt (%s) ber:\n", fmt )); |
BER_DUMP(( "LIBLBER", LDAP_LEVEL_DETAIL2, ber, 1 )); |
BER_DUMP(( "liblber", LDAP_LEVEL_DETAIL2, ber, 1 )); |
#else |
#else |
ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug, |
ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug, |
"ber_scanf fmt (%s) ber:\n", fmt ); |
"ber_scanf fmt (%s) ber:\n", fmt ); |
Line 629 ber_scanf ( BerElement *ber,
|
Line 629 ber_scanf ( BerElement *ber,
|
|
|
default: |
default: |
if( ber->ber_debug ) { |
if( ber->ber_debug ) { |
|
#ifdef NEW_LOGGING |
|
LDAP_LOG(( "liblber", LDAP_LEVEL_ERR, |
|
"ber_scanf: unknown fmt %c\n", *fmt )); |
|
#else |
ber_log_printf( LDAP_DEBUG_ANY, ber->ber_debug, |
ber_log_printf( LDAP_DEBUG_ANY, ber->ber_debug, |
"ber_scanf: unknown fmt %c\n", *fmt ); |
"ber_scanf: unknown fmt %c\n", *fmt ); |
|
#endif |
} |
} |
rc = LBER_DEFAULT; |
rc = LBER_DEFAULT; |
break; |
break; |
Line 715 ber_scanf ( BerElement *ber,
|
Line 720 ber_scanf ( BerElement *ber,
|
case 'v': /* sequence of strings */ |
case 'v': /* sequence of strings */ |
sss = va_arg( ap, char *** ); |
sss = va_arg( ap, char *** ); |
if ( *sss ) { |
if ( *sss ) { |
for (j = 0; (*sss)[j]; j++) { |
for (j = 0; (*sss)[j]; j++) { |
LBER_FREE( (*sss)[j] ); |
LBER_FREE( (*sss)[j] ); |
(*sss)[j] = NULL; |
(*sss)[j] = NULL; |
} |
} |