Commit b1d4cd19 authored by Rémi Duraffort's avatar Rémi Duraffort

xdg: fix infinite loop if the file is invalid

parent 8efb3b63
...@@ -181,11 +181,12 @@ static char *config_GetTypeDir (const char *xdg_name) ...@@ -181,11 +181,12 @@ static char *config_GetTypeDir (const char *xdg_name)
{ {
free (path); free (path);
path = NULL; path = NULL;
continue; break;
} }
*(out++) = *(ptr++); *(out++) = *(ptr++);
} }
*out = '\0'; if (path != NULL)
*out = '\0';
break; break;
} }
free (linebuf); free (linebuf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment