[MPlayer-cvslog] r37965 - trunk/gui/util/misc.c
ib
subversion at mplayerhq.hu
Fri Sep 29 18:50:58 EEST 2017
Author: ib
Date: Fri Sep 29 18:50:58 2017
New Revision: 37965
Log:
Fix cue file analyzer.
Add the missing NULL termination of the returned list of playlist items
which may be missing after subsequent calls.
Modified:
trunk/gui/util/misc.c
Modified: trunk/gui/util/misc.c
==============================================================================
--- trunk/gui/util/misc.c Fri Sep 29 08:55:14 2017 (r37964)
+++ trunk/gui/util/misc.c Fri Sep 29 18:50:58 2017 (r37965)
@@ -120,7 +120,7 @@ float msf2sec(const char *msf)
*/
plItem **cue_playlist(const char *fname)
{
- static plItem *item[100];
+ static plItem *item[101];
FILE *file;
char line[256], *l, *fmt, *path = NULL, *data = NULL;
int i = -1, isFILE = False, isTRACK = False;
@@ -132,6 +132,8 @@ plItem **cue_playlist(const char *fname)
else
return NULL;
+ memset(item, 0, sizeof(item));
+
while (fgetstr(line, sizeof(line), file) && (i < 99)) {
l = (char *)ltrim(line);
More information about the MPlayer-cvslog
mailing list