From dce2d8206ecd35c96e75cc0662432c2a4f9c3d7a Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Sun, 24 Feb 2013 12:53:59 +0000 Subject: [PATCH] budb: Store dumper information correctly Change f498c18a6f7300eb89ca3b9d9b85c4d461fa8474 attempted to fix a problem with using an inappropriate function to copy the ktc_principal value 'principal' into the d.dumper structure element. Originally the code read: principal_hton(&principal, &d.dumper) which copies the 'host' principal principal into the 'net' structure d.dumper. However, this was changed to principal = d.dumper Which populates 'principal' with whatever garbage is in the d.dumper structure. Fix this so that the assignment is done the right way around. Caught by clang-analyzer Change-Id: Id9865a36b5a9351d013c695ed301b627ddc4a915 Reviewed-on: http://gerrit.openafs.org/9252 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot --- src/budb/procs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/budb/procs.c b/src/budb/procs.c index 0338f45..d3d8283 100644 --- a/src/budb/procs.c +++ b/src/budb/procs.c @@ -1476,7 +1476,7 @@ CreateDump(struct rx_call *call, struct budb_dumpEntry *dump) dump->created = dump->id; d.created = htonl(dump->created); - principal = d.dumper; + d.dumper = principal; tapeSet_hton(&dump->tapes, &d.tapes); d.flags = htonl(dump->flags | BUDB_DUMP_INPROGRESS); -- 1.9.4