comparison stream/stream_cue.c @ 33426:fe99e2d4ffb1

Avoid crash if terminating " is missing. Part of patch by Ivan Kalvachev [ikalvachev gmail com].
author reimar
date Sun, 29 May 2011 11:43:38 +0000
parents 15659ae10207
children ebee3b6ab9ce
comparison
equal deleted inserted replaced
33425:15659ae10207 33426:fe99e2d4ffb1
184 mp_msg (MSGT_OPEN,MSGL_INFO, "[bincue] cue_find_bin(%s)\n", firstline); 184 mp_msg (MSGT_OPEN,MSGL_INFO, "[bincue] cue_find_bin(%s)\n", firstline);
185 if (strncmp(firstline, "FILE \"",6)==0) 185 if (strncmp(firstline, "FILE \"",6)==0)
186 { 186 {
187 firstline += 6; 187 firstline += 6;
188 i = 0; 188 i = 0;
189 while ( *firstline != '"') 189 while ( *firstline && *firstline != '"')
190 { 190 {
191 bin_filename[i] = *firstline++; 191 bin_filename[i] = *firstline++;
192 192
193 /* if I found a path info, then delete all before it */ 193 /* if I found a path info, then delete all before it */
194 switch (bin_filename[i]) 194 switch (bin_filename[i])