Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
settings - use alloca() in hts_settings_makedirs()
  • Loading branch information
perexg committed Jul 12, 2014
1 parent 9c783ef commit 4a43a50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/settings.c
Expand Up @@ -70,7 +70,9 @@ int
hts_settings_makedirs ( const char *inpath )
{
size_t x = strlen(inpath) - 1;
char path[512];
char *path = alloca(x + 2);

if (path == NULL) return -1;
strcpy(path, inpath);

while (x) {
Expand Down

0 comments on commit 4a43a50

Please sign in to comment.