Diff for /libraries/liblber/decode.c between versions 1.59 and 1.60

version 1.59, 2001/01/17 16:08:44 version 1.60, 2001/05/06 17:07:24
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.58 2000/10/25 13:35:01 gwilliams Exp $ */  /* $OpenLDAP: pkg/ldap/libraries/liblber/decode.c,v 1.59 2001/01/17 16:08:44 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 137  ber_skip_tag( BerElement *ber, ber_len_t Line 137  ber_skip_tag( BerElement *ber, ber_len_t
                 *len = lc;                  *len = lc;
         }          }
   
           /* BER element should have enough data left */
           if( *len > ber_pvt_ber_remaining( ber ) ) {
                   return LBER_DEFAULT;
           }
   
         return tag;          return tag;
 }  }
   
Line 252  ber_get_stringb( Line 257  ber_get_stringb(
         if ( (tag = ber_skip_tag( ber, &datalen )) == LBER_DEFAULT ) {          if ( (tag = ber_skip_tag( ber, &datalen )) == LBER_DEFAULT ) {
                 return LBER_DEFAULT;                  return LBER_DEFAULT;
         }          }
         if ( datalen > (*len - 1) ) {  
           /* must fit within allocated space with termination */
           if ( datalen >= *len ) {
                 return LBER_DEFAULT;                  return LBER_DEFAULT;
         }          }
   

Removed from v.1.59  
changed lines
  Added in v.1.60


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org