summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-19 16:33:06 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-19 16:33:06 +0000
commit20b28ac75e6a42d61b2bd87c5df725617dba9fc7 (patch)
tree8349ce62a99a1c88f6cd9fa3a5d0e6293a4a08c1
parentfd3d8e7b3c28f6f00d5fb06e7b487707e217749e (diff)
downloadmpv-20b28ac75e6a42d61b2bd87c5df725617dba9fc7.tar.bz2
mpv-20b28ac75e6a42d61b2bd87c5df725617dba9fc7.tar.xz
Make sure we do not write the terminating 0 out of bounds
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25804 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--stream/stream_cddb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/stream_cddb.c b/stream/stream_cddb.c
index 9d061cbaa1..70c21eb43e 100644
--- a/stream/stream_cddb.c
+++ b/stream/stream_cddb.c
@@ -455,7 +455,7 @@ cddb_read_parse(HTTP_header_t *http_hdr, cddb_data_t *cddb_data) {
return -1;
}
cddb_data->xmcd_file = ptr;
- cddb_data->xmcd_file_size = ptr2-ptr+2;
+ cddb_data->xmcd_file_size = ptr2-ptr;
cddb_data->xmcd_file[cddb_data->xmcd_file_size] = '\0';
// Avoid the http_free function to free the xmcd file...save a mempcy...
http_hdr->body = NULL;