Diff for /libraries/liblber/decode.c between versions 1.34.6.7 and 1.34.6.8

version 1.34.6.7, 2001/05/06 19:53:57 version 1.34.6.8, 2001/11/06 16:49:17
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.34.6.6 2000/10/12 19:52:39 kurt Exp $ */  /* $OpenLDAP: pkg/ldap/libraries/liblber/decode.c,v 1.34.6.7 2001/05/06 19:53:57 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 585  ber_scanf ( BerElement *ber, Line 585  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;
   
                                 *sss = (char **) LBER_REALLOC( *sss,                                  *sss = (char **) LBER_REALLOC( *sss,
                                         (j + 2) * sizeof(char *) );                                          (j + 2) * sizeof(char *) );
   
                                   if( *sss == NULL ) {
                                           LBER_FREE( save );
                                           rc = LBER_DEFAULT;
                                           goto breakout;
                                   }
   
                                 rc = ber_get_stringa( ber, &((*sss)[j]) );                                  rc = ber_get_stringa( ber, &((*sss)[j]) );
                                 j++;                                  j++;
                         }                          }
Line 603  ber_scanf ( BerElement *ber, Line 611  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;
   
                                 *bv = (struct berval **) LBER_REALLOC( *bv,                                  *bv = (struct berval **) LBER_REALLOC( *bv,
                                         (j + 2) * sizeof(struct berval *) );                                          (j + 2) * sizeof(struct berval *) );
                                   
                                   if( *bv == NULL ) {
                                           LBER_FREE( save );
                                           rc = LBER_DEFAULT;
                                           goto breakout;
                                   }
   
                                 rc = ber_get_stringal( ber, &((*bv)[j]) );                                  rc = ber_get_stringal( ber, &((*bv)[j]) );
                                 j++;                                  j++;
                         }                          }
Line 639  ber_scanf ( BerElement *ber, Line 655  ber_scanf ( BerElement *ber,
                 }                  }
         }          }
   
   breakout:
         va_end( ap );          va_end( ap );
   
         if ( rc == LBER_DEFAULT ) {          if ( rc == LBER_DEFAULT ) {

Removed from v.1.34.6.7  
changed lines
  Added in v.1.34.6.8


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