version 1.128, 2009/10/28 22:00:27
|
version 1.129, 2009/11/04 10:17:03
|
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.127 2009/08/12 20:13:50 hallvard Exp $ */ |
/* $OpenLDAP: pkg/ldap/libraries/liblber/decode.c,v 1.128 2009/10/28 22:00:27 hallvard Exp $ */ |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
* |
* |
* Copyright 1998-2009 The OpenLDAP Foundation. |
* Copyright 1998-2009 The OpenLDAP Foundation. |
Line 481 ber_get_stringbv( BerElement *ber, struc
|
Line 481 ber_get_stringbv( BerElement *ber, struc
|
|
|
tag = ber_skip_element( ber, bv ); |
tag = ber_skip_element( ber, bv ); |
if ( tag == LBER_DEFAULT || |
if ( tag == LBER_DEFAULT || |
(( option & LBER_BV_STRING ) && memchr( bv->bv_val, 0, bv->bv_len ))) |
(( option & LBER_BV_STRING ) && |
|
bv->bv_len && memchr( bv->bv_val, 0, bv->bv_len - 1 ))) |
{ |
{ |
bv->bv_val = NULL; |
bv->bv_val = NULL; |
return LBER_DEFAULT; |
return LBER_DEFAULT; |
Line 518 ber_get_stringbv_null( BerElement *ber,
|
Line 519 ber_get_stringbv_null( BerElement *ber,
|
return tag; |
return tag; |
} |
} |
|
|
if (( option & LBER_BV_STRING ) && memchr( bv->bv_val, 0, bv->bv_len )) { |
if (( option & LBER_BV_STRING ) && |
|
memchr( bv->bv_val, 0, bv->bv_len - 1 )) |
|
{ |
bv->bv_val = NULL; |
bv->bv_val = NULL; |
return LBER_DEFAULT; |
return LBER_DEFAULT; |
} |
} |