mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Fix use-after-free in error case in fserve, as noted by Jerome Alet
svn path=/icecast/trunk/icecast/; revision=11412
This commit is contained in:
parent
25c55e1f86
commit
a1d9503d8e
@ -465,13 +465,14 @@ int fserve_client_create (client_t *httpclient, const char *path)
|
||||
}
|
||||
|
||||
file = fopen (fullpath, "rb");
|
||||
free (fullpath);
|
||||
if (file == NULL)
|
||||
{
|
||||
WARN1 ("Problem accessing file \"%s\"", fullpath);
|
||||
client_send_404 (httpclient, "File not readable");
|
||||
free (fullpath);
|
||||
return -1;
|
||||
}
|
||||
free (fullpath);
|
||||
|
||||
content_length = (int64_t)file_buf.st_size;
|
||||
range = httpp_getvar (httpclient->parser, "range");
|
||||
|
Loading…
Reference in New Issue
Block a user