--- io.c.org 2003-07-18 09:40:03.000000000 +0200 +++ io.c 2003-07-18 09:58:58.000000000 +0200 @@ -349,7 +349,8 @@ /* a line with device-info found (by checking for ")")*/ p1 = index(line,')'); - if (p1 != NULL && !strstr(line,")\"")) { + if (p1 != NULL && !strstr(line,")\"") && + (strstr(line,"\t") || line[0] == ' ')) { strip_string(line); /* get scsi-id */ @@ -400,6 +401,7 @@ /* get full rest of line */ p1=strtok(NULL,""); + if (!p1) return; strcpy(tmp,p1); if (*tmp == '\'') { @@ -2654,6 +2656,9 @@ trackinfo[tocnr]->start_sec = atoi(p1); p1 = strtok(NULL,""); + if (p1 == NULL) { + g_error("Unexpected output in cdda2wav toc-output\n"); + } strcpy(tmp,p1); strip_string(tmp);