Skip to content

Commit

Permalink
idevicedebug: Fix invalid write due to out of bounds access
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyM committed Oct 14, 2014
1 parent 5329197 commit 12ed909
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/idevicedebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ int main(int argc, char *argv[])
/* set arguments and run app */
debug_info("Setting argv...");
i++; /* i is the offset of the bundle identifier, thus skip it */
int app_argc = (argc - i + 1);
int app_argc = (argc - i + 2);
char **app_argv = (char**)malloc(sizeof(char*) * app_argc);
app_argv[0] = path;
debug_info("app_argv[%d] = %s", 0, app_argv[0]);
Expand Down

0 comments on commit 12ed909

Please sign in to comment.