diff options
author | Rom Lemarchand <romlem@google.com> | 2013-01-14 14:11:01 -0800 |
---|---|---|
committer | Rom Lemarchand <romlem@google.com> | 2013-01-28 13:11:32 -0800 |
commit | 611f5b4b938f2ffcf2a2e71a847e4fd12587ca4b (patch) | |
tree | 4992df2c91076bfbd1ce6e319ba688bd4acc81ed /logwrapper/logwrap.c | |
parent | 0cc2cab6af2635e3293b3611a4c0982061dbb935 (diff) | |
download | system_core-611f5b4b938f2ffcf2a2e71a847e4fd12587ca4b.tar.gz system_core-611f5b4b938f2ffcf2a2e71a847e4fd12587ca4b.tar.bz2 system_core-611f5b4b938f2ffcf2a2e71a847e4fd12587ca4b.zip |
logwrap: fix off by 1 argument error
Fix off by 1 argument parsing error in liblogwrap.
Change-Id: I79832ae338a71c445f9f616d780c577826874386
Diffstat (limited to 'logwrapper/logwrap.c')
-rw-r--r-- | logwrapper/logwrap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/logwrapper/logwrap.c b/logwrapper/logwrap.c index 9cd3fe4cc..09f8b814c 100644 --- a/logwrapper/logwrap.c +++ b/logwrapper/logwrap.c @@ -227,7 +227,7 @@ int logwrap(int argc, char* argv[], int *status) { dup2(child_ptty, 2); close(child_ptty); - child(argc - 1, &argv[1]); + child(argc, argv); fatal("This should never happen\n"); return -1; } else { @@ -268,7 +268,7 @@ int logwrap(int argc, char* argv[], int *status) { setgid(AID_LOG); setuid(AID_LOG); - rc = parent(argv[1], parent_ptty, sockets[1], pid, status); + rc = parent(argv[0], parent_ptty, sockets[1], pid, status); } close(sockets[0]); |