]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/tmplout.c
Don't provide ldap.OpenLDAP.org and dc=OpenLDAP, dc=Org as the defaults.
[openldap] / libraries / libldap / tmplout.c
index 94cc00c1393068c4e0d53eaa4651f06986a28b8c..9e5f9af0fb10d6385fa681f4bb866fc7ae1dcfc0 100644 (file)
@@ -1,3 +1,7 @@
+/*
+ * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
 /*
  * tmplout.c:  display template library output routines for LDAP clients
  * 12 April 1994 by Mark C Smith
@@ -261,6 +265,10 @@ do_entry2text(
                ldap_value_free( vals );
            }
        }
+
+       if( ber != NULL) {
+               ber_free( ber, 0 );
+       }
     } else {
        for ( rowp = ldap_first_tmplrow( tmpl );
                NONFATAL_LDAP_ERR( err ) && rowp != NULLTMPLITEM;
@@ -901,11 +909,11 @@ time2text( char *ldtimestr, int dateonly )
 
     gmttime = gtime( &t );
 
-    timestr = ldap_int_ctime( &gmttime, timebuf );
+    timestr = ldap_pvt_ctime( &gmttime, timebuf );
    
     timestr[ strlen( timestr ) - 1 ] = zone;   /* replace trailing newline */
     if ( dateonly ) {
-       strcpy( timestr + 11, timestr + 20 );
+       SAFEMEMCPY( timestr + 11, timestr + 20, strlen( timestr + 20 ) + 1 );
     }
 
     return( timestr );