Do not call principal_hton() to copy ktc_principal structs
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 15 Jul 2009 05:46:45 +0000 (01:46 -0400)
committerRuss Allbery <rra@stanford.edu>
Wed, 15 Jul 2009 07:19:30 +0000 (01:19 -0600)
Reported by Marcus Watts.

principal_hton() is used to copy butc_principal structs.
Passing in a ktc_principal as source and destination will
result in beyond the end of the ktc_principal.

LICENSE IPL10

Reviewed-on: http://gerrit.openafs.org/86
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>

src/budb/procs.c

index 7f5f350..f8d37cc 100644 (file)
@@ -1484,7 +1484,7 @@ CreateDump(struct rx_call *call, struct budb_dumpEntry *dump)
        dump->created = dump->id;
     d.created = htonl(dump->created);
 
-    principal_hton(&principal, &d.dumper);
+    principal = d.dumper;
     tapeSet_hton(&dump->tapes, &d.tapes);
 
     d.flags = htonl(dump->flags | BUDB_DUMP_INPROGRESS);