]> andersk Git - moira.git/commitdiff
Use strncpy instead of bcopy when copying the entity argument, to prevent
authortytso <tytso>
Fri, 10 Dec 1993 14:00:49 +0000 (14:00 +0000)
committertytso <tytso>
Fri, 10 Dec 1993 14:00:49 +0000 (14:00 +0000)
an illegal memory access past the end of malloc'ed area.

Added support for optional debugging malloc.  No code changes if you are
using the normal malloc in mr_smalloc.c

server/mr_sauth.c

index c27ec9452b0fc67580398c1383709b3c46c8250e..dcb45b23efa123a203c8010f8ab97eae9e5ffc34 100644 (file)
@@ -21,7 +21,6 @@ static char *rcsid_sms_sauth_c = "$Header$";
 
 extern char buf1[];
 extern char *whoami;
-extern char *malloc();
 
 char *kname_unparse();
 
@@ -81,7 +80,7 @@ do_auth(cl)
                                 &cl->client_id, &cl->users_id);
 
        if (cl->args->mr_version_no == MR_VERSION_2) {
-           bcopy(cl->args->mr_argv[1], cl->entity, 8);
+           strncpy(cl->entity, cl->args->mr_argv[1], 8);
            cl->entity[8] = 0;
        } else {
            strcpy(cl->entity, "???");
This page took 0.104955 seconds and 5 git commands to generate.