mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
unlikely to occur race, but fix it anyway
svn path=/icecast/trunk/icecast/; revision=7597
This commit is contained in:
parent
69af6210c0
commit
2a991af1a6
@ -222,12 +222,11 @@ char *util_get_path_from_normalised_uri(char *uri) {
|
|||||||
ice_config_t *config = config_get_config();
|
ice_config_t *config = config_get_config();
|
||||||
|
|
||||||
webroot = config->webroot_dir;
|
webroot = config->webroot_dir;
|
||||||
config_release_config();
|
|
||||||
|
|
||||||
fullpath = malloc(strlen(uri) + strlen(webroot) + 1);
|
fullpath = malloc(strlen(uri) + strlen(webroot) + 1);
|
||||||
strcpy(fullpath, webroot);
|
if (fullpath)
|
||||||
|
sprintf (fullpath, "%s%s", webroot, uri);
|
||||||
strcat(fullpath, uri);
|
config_release_config();
|
||||||
|
|
||||||
return fullpath;
|
return fullpath;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user