[xiph-cvs] cvs commit: ices/src im_playlist.c

Michael Smith msmith at xiph.org
Sun Oct 21 03:22:00 PDT 2001



msmith      01/10/21 03:22:00

  Modified:    src      im_playlist.c
  Log:
  Correct handling of bad playlist entries to prevent segfault.

Revision  Changes    Path
1.3       +5 -2      ices/src/im_playlist.c

Index: im_playlist.c
===================================================================
RCS file: /usr/local/cvsroot/ices/src/im_playlist.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- im_playlist.c	2001/09/25 12:04:21	1.2
+++ im_playlist.c	2001/10/21 10:21:59	1.3
@@ -1,7 +1,7 @@
 /* playlist.c
  * - Basic playlist functionality
  *
- * $Id: im_playlist.c,v 1.2 2001/09/25 12:04:21 msmith Exp $
+ * $Id: im_playlist.c,v 1.3 2001/10/21 10:21:59 msmith Exp $
  *
  * Copyright (c) 2001 Michael Smith <msmith at labyrinth.net.au>
  *
@@ -103,8 +103,11 @@
         {
                 pl->nexttrack = 0;
 
-		if(pl->current_file)
+		if(pl->current_file) 
+        {
                         fclose(pl->current_file);
+            pl->current_file = NULL;
+        }
 
                 newfn = pl->get_filename(pl->data);
 

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list