Skip to content
Snippets Groups Projects
Commit 98fbc382 authored by Jaewon Choi's avatar Jaewon Choi
Browse files

Fix allocation bug

parent 3cbc24d7
Branches master
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ void parse_single_command(const char* command,
int ti = 0;
while (tok != NULL) {
(*argv)[ti] = (char*)malloc(strlen(tok));
(*argv)[ti] = (char*)malloc(strlen(tok) + 1);
strcpy((*argv)[ti], tok);
++ti;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment