settings - use alloca() in hts_settings_makedirs()

This commit is contained in:
Jaroslav Kysela 2014-07-12 22:37:47 +02:00
parent 9c783ef2d0
commit 4a43a508db

View file

@ -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) {