Merge "Fix NULL deref on exec-in with insufficient arguments" am: 245e4dbfd4
am: a0690543da
* commit 'a0690543dac2792508caef09e9e97804b31fea24':
Fix NULL deref on exec-in with insufficient arguments
Change-Id: Ic5e62d01fecc77aace676bf6cdf4218f93806860
This commit is contained in:
commit
f9f0b5f413
|
@ -1656,6 +1656,11 @@ int adb_commandline(int argc, const char **argv) {
|
|||
else if (!strcmp(argv[0], "exec-in") || !strcmp(argv[0], "exec-out")) {
|
||||
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:";
|
||||
cmd += argv[1];
|
||||
argc -= 2;
|
||||
|
|
Loading…
Reference in New Issue