Skip to content

Commit

Permalink
Merge pull request #156 from kanurag94/master
Browse files Browse the repository at this point in the history
Fix Buffer Overflow issue
  • Loading branch information
kovzol authored May 16, 2020
2 parents f979c8e + bc6ebf6 commit f4c96c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/util/xstdio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ xio_path xio_getdirectory(xio_constpath filename)

xio_path xio_getfilename(const char *basename, const char *extension)
{
static char name[40];
int pathlength = sizeof(basename) + sizeof(extension);
static char* name;
name = (char* )malloc(pathlength * sizeof (char));
int nimage = 0;
struct stat sb;
char *base = xio_fixpath(basename);
Expand Down

0 comments on commit f4c96c4

Please sign in to comment.