Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed buffer overflow.
  • Loading branch information
icculus committed Feb 25, 2014
1 parent 7d41d7d commit de08a84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/finderrors.c
Expand Up @@ -67,7 +67,7 @@ static int do_file(const char *profile, const char *dname, const char *fn, int *

(*total)++;

char *fname = (char *) alloca(strlen(fn) + strlen(dname) + 1);
char *fname = (char *) alloca(strlen(fn) + strlen(dname) + 2);
sprintf(fname, "%s/%s", dname, fn);
FILE *io = fopen(fname, "rb");
if (io == NULL)
Expand Down

0 comments on commit de08a84

Please sign in to comment.