[xiph-commits] r11412 - icecast/trunk/icecast/src
msmith at svn.xiph.org
msmith at svn.xiph.org
Thu May 18 15:06:34 PDT 2006
Author: msmith
Date: 2006-05-18 15:06:32 -0700 (Thu, 18 May 2006)
New Revision: 11412
Modified:
icecast/trunk/icecast/src/fserve.c
Log:
Fix use-after-free in error case in fserve, as noted by Jerome Alet
Modified: icecast/trunk/icecast/src/fserve.c
===================================================================
--- icecast/trunk/icecast/src/fserve.c 2006-05-18 13:35:06 UTC (rev 11411)
+++ icecast/trunk/icecast/src/fserve.c 2006-05-18 22:06:32 UTC (rev 11412)
@@ -465,13 +465,14 @@
}
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");
More information about the commits
mailing list