[xiph-cvs] cvs commit: icecast/src source.c

Karl Heyes karl at xiph.org
Mon Dec 1 17:11:12 PST 2003



karl        03/12/01 20:11:12

  Modified:    src      source.c
  Log:
  fix segv when fallback or dumpfilename are not specified

Revision  Changes    Path
1.61      +4 -2      icecast/src/source.c

Index: source.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/source.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- source.c	1 Dec 2003 17:18:37 -0000	1.60
+++ source.c	2 Dec 2003 01:11:12 -0000	1.61
@@ -72,9 +72,11 @@
     src->yp_public = 0;
 
     if(mountinfo != NULL) {
-        src->fallback_mount = strdup (mountinfo->fallback_mount);
+        if (mountinfo->fallback_mount != NULL)
+            src->fallback_mount = strdup (mountinfo->fallback_mount);
         src->max_listeners = mountinfo->max_listeners;
-        src->dumpfilename = strdup (mountinfo->dumpfile);
+        if (mountinfo->dumpfile != NULL)
+            src->dumpfilename = strdup (mountinfo->dumpfile);
     }
 
     if(src->dumpfilename != NULL) {

<p><p>--- >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