changeset 8557:97cf659a4c38

- fixed uninitialized offsets[] - tracklist may not be closed by '.' but EOF
author arpi
date Tue, 24 Dec 2002 21:59:38 +0000
parents ecff1745d189
children c40e862a7dc2
files libmpdemux/cddb.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/cddb.c	Tue Dec 24 18:41:20 2002 +0000
+++ b/libmpdemux/cddb.c	Tue Dec 24 21:59:38 2002 +0000
@@ -366,7 +366,7 @@
 				ptr2 = strstr(ptr, "\n.\n");
 				if( ptr2==NULL ) {
 					printf("Unable to find '.'\n");
-					return -1;
+					ptr2=ptr+strlen(ptr); //return -1;
 				}
 			}
 			// Ok found the end
@@ -580,8 +580,9 @@
 	for( i=0; i<cddb_data->tracks ; i++ ) {
 		ptr += sprintf(ptr, "%d+", cdtoc[i].frame );
 	}
+	ptr[0]=0;
 	time_len = (cdtoc[cddb_data->tracks].frame)/75;
-
+	
 	cddb_data->freedb_server = DEFAULT_FREEDB_SERVER;
 	cddb_data->freedb_proto_level = 1;
 	cddb_data->xmcd_file = NULL;