changeset 25776:cf1d3164d30c

Make sure we do not write the terminating 0 out of bounds
author reimar
date Sat, 19 Jan 2008 16:33:06 +0000
parents 7a0bcfc36766
children 1d16b891d440
files stream/stream_cddb.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_cddb.c	Sat Jan 19 15:20:18 2008 +0000
+++ b/stream/stream_cddb.c	Sat Jan 19 16:33:06 2008 +0000
@@ -455,7 +455,7 @@
 				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;