From a16b46816cd7c54b6c39fe9ba7a184da66215d0e Mon Sep 17 00:00:00 2001 From: h1618 Date: Fri, 29 Nov 2013 16:35:22 +0100 Subject: [PATCH] assign user before use sorry, jumped too short on my last commit: the user array has to be initialized before first use ... --- Superuser/jni/su/activity.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Superuser/jni/su/activity.c b/Superuser/jni/su/activity.c index c476a47..a3ef9c7 100644 --- a/Superuser/jni/su/activity.c +++ b/Superuser/jni/su/activity.c @@ -90,6 +90,9 @@ int send_result(struct su_context *ctx, policy_t policy) { char desired_uid[256]; sprintf(desired_uid, "%d", ctx->to.uid); + char user[64]; + get_owner_login_user_args(ctx, user, sizeof(user)); + if (0 != ctx->user.android_user_id) { char android_user_id[256]; sprintf(android_user_id, "%d", ctx->user.android_user_id); @@ -125,9 +128,6 @@ int send_result(struct su_context *ctx, policy_t policy) { silent_run(user_result_command); } - char user[64]; - get_owner_login_user_args(ctx, user, sizeof(user)); - char *result_command[] = { AM_PATH, ACTION_RESULT, -- 2.11.0