Commit 18c9a9c3c2698d71575d49c308db88f295ddffed
Committed by
Blue Swirl
1 parent
88e150a5
bsd-users: fix strace
Hi! Attached patch fixes an unlock bug in strace. Catched by gcc due to an use of uninitialized variable. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
Showing
1 changed file
with
2 additions
and
2 deletions
bsd-user/strace.c
... | ... | @@ -36,7 +36,7 @@ print_execve(const struct syscallname *name, |
36 | 36 | unlock_user(s, arg1, 0); |
37 | 37 | |
38 | 38 | for (arg_ptr_addr = arg2; ; arg_ptr_addr += sizeof(abi_ulong)) { |
39 | - abi_ulong *arg_ptr, arg_addr, s_addr; | |
39 | + abi_ulong *arg_ptr, arg_addr; | |
40 | 40 | |
41 | 41 | arg_ptr = lock_user(VERIFY_READ, arg_ptr_addr, sizeof(abi_ulong), 1); |
42 | 42 | if (!arg_ptr) |
... | ... | @@ -47,7 +47,7 @@ print_execve(const struct syscallname *name, |
47 | 47 | break; |
48 | 48 | if ((s = lock_user_string(arg_addr))) { |
49 | 49 | gemu_log("\"%s\",", s); |
50 | - unlock_user(s, s_addr, 0); | |
50 | + unlock_user(s, arg_addr, 0); | |
51 | 51 | } |
52 | 52 | } |
53 | 53 | ... | ... |