Skip to content

Commit

Permalink
Merge pull request koush#211 from h1618/patch-1
Browse files Browse the repository at this point in the history
assign user before use
  • Loading branch information
koush committed Nov 29, 2013
2 parents 897a880 + a16b468 commit 5292088
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Superuser/jni/su/activity.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 5292088

Please sign in to comment.