Merge "Fix NULL deref on exec-in with insufficient arguments"
am: 245e4dbfd4
* commit '245e4dbfd459f63bad100b09bd58e3931924e16f':
Fix NULL deref on exec-in with insufficient arguments
Change-Id: I386257b6c30c4f02e161e2b0a827e73eca9d229e
This commit is contained in:
commit
a0690543da
1 changed files with 5 additions and 0 deletions
|
|
@ -1613,6 +1613,11 @@ int adb_commandline(int argc, const char **argv) {
|
||||||
else if (!strcmp(argv[0], "exec-in") || !strcmp(argv[0], "exec-out")) {
|
else if (!strcmp(argv[0], "exec-in") || !strcmp(argv[0], "exec-out")) {
|
||||||
int exec_in = !strcmp(argv[0], "exec-in");
|
int exec_in = !strcmp(argv[0], "exec-in");
|
||||||
|
|
||||||
|
if (argc < 2) {
|
||||||
|
fprintf(stderr, "Usage: adb %s command\n", argv[0]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
std::string cmd = "exec:";
|
std::string cmd = "exec:";
|
||||||
cmd += argv[1];
|
cmd += argv[1];
|
||||||
argc -= 2;
|
argc -= 2;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue