/* Must be at end now */
/* NOTE: OpenSSL tolerates CL with garbage past the end */
if ( len || tag != LBER_DEFAULT ) {
- struct berval issuer_dn, thisUpdate;
+ struct berval issuer_dn = BER_BVNULL, thisUpdate;
char tubuf[STRLENOF("YYYYmmddHHMMSSZ") + 1];
int rc;
issuer_dn.bv_val, thisUpdate.bv_val, 0 );
done:;
- ber_memfree( issuer_dn.bv_val );
+ if ( ! BER_BVISNULL( &issuer_dn ) ) {
+ ber_memfree( issuer_dn.bv_val );
+ }
return rc;
}
p = normalized->bv_val;
for ( l = 0; !BER_BVISNULL( &nlines[l] ); l++ ) {
- p = lutil_strncopy( p, nlines[l].bv_val, nlines[l].bv_len );
+ p = lutil_memcopy( p, nlines[l].bv_val, nlines[l].bv_len );
*p++ = '$';
}
rc = generalizedTimeValidate( NULL, &bv );
if ( rc == LDAP_SUCCESS && out != NULL ) {
+ if ( out->bv_len > bv.bv_len ) {
+ out->bv_val[ bv.bv_len ] = '\0';
+ }
out->bv_len = bv.bv_len;
}