Skip to content

Commit

Permalink
allocate enough memory for finder items NUL term
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandwalker committed Jul 8, 2017
1 parent 4b0aba8 commit ca989aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ file_finder_read(struct file_finder *finder, const char *commit)
break;
}

finder->file[files] = calloc(1, sizeof(*finder->file) + buf.size);
finder->file[files] = calloc(1, sizeof(*finder->file) + buf.size + 1);
if (!finder->file[files]) {
ok = false;
break;
Expand Down

0 comments on commit ca989aa

Please sign in to comment.