]> git.sur5r.net Git - openldap/commitdiff
Change overlapping `strcpy( x, y )' to `SAFEMEMCPY( x, y, strlen( y ) + 1 )'
authorHallvard Furuseth <hallvard@openldap.org>
Sun, 27 Dec 1998 02:15:08 +0000 (02:15 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Sun, 27 Dec 1998 02:15:08 +0000 (02:15 +0000)
clients/tools/ldapmodify.c
libraries/libldap/ufn.c

index d6342746746c2542cfda097e19c28bd48cc11718..96a667ff118773da6b8269862f20936486d36481 100644 (file)
@@ -423,7 +423,7 @@ process_ldapmod_rec( char *rbuf )
            rbuf = NULL;
        } else {
            if ( *(p-1) == '\\' ) {     /* lines ending in '\' are continued */
-               strcpy( p - 1, p );
+               SAFEMEMCPY( p - 1, p, strlen( p ) + 1 );
                rbuf = p;
                continue;
            }
index d56dc5799dbead14e344b36c1ef50ecd45fc06e6..b2c34aee80127d304d114aaf68b071de7054470c 100644 (file)
@@ -97,7 +97,8 @@ ldap_ufn_search_ctx( LDAP *ld, char **ufncomp, int ncomp, char *prefix,
 
                        if ( (quote = strrchr( ufncomp[ncomp], '"' )) != NULL )
                                *quote = '\0';
-                       strcpy( ufncomp[ncomp], ufncomp[ncomp] + 1 );
+                       SAFEMEMCPY( ufncomp[ncomp], ufncomp[ncomp] + 1,
+                                   strlen( ufncomp[ncomp] + 1 ) + 1 );
                }
                if ( ncomp == 0 )
                        phase = 3;