Hi,

  While I was testing mozplugger, I found that going to the page below
and playing the html5 video crashes firefox. The diff below fixes it.

  http://camendesign.com/code/video_for_everybody

  There is still no audio in that video, which is the main cause of
the crash, but since it's possible that s is valid and handle is not
better be safe than sorry.
  OK?

  f.-

Index: Makefile
===================================================================
RCS file: /cvs/ports/www/mozilla-firefox/Makefile,v
retrieving revision 1.149
diff -u -r1.149 Makefile
--- Makefile    19 Sep 2010 19:19:05 -0000      1.149
+++ Makefile    26 Sep 2010 09:34:23 -0000
@@ -8,6 +8,8 @@
 MOZILLA_PROJECT =      mozilla-firefox
 MOZILLA_CODENAME =     browser
 
+REVISION =     0
+
 SO_VERSION =   22.1
 # NOTE: Must bump minor version if any shlib's are removed from the
 # components dir to avoid pkg_add -r issues.
Index: files/sydney_audio_sndio.c
===================================================================
RCS file: /cvs/ports/www/mozilla-firefox/files/sydney_audio_sndio.c,v
retrieving revision 1.2
diff -u -r1.2 sydney_audio_sndio.c
--- files/sydney_audio_sndio.c  6 Sep 2010 12:59:50 -0000       1.2
+++ files/sydney_audio_sndio.c  26 Sep 2010 09:34:23 -0000
@@ -158,12 +158,11 @@
 int
 sa_stream_destroy(sa_stream_t *s)
 {
-       if (s == NULL)
-               return SA_SUCCESS;
-
-       sio_close(s->handle);
-       free(s);
-
+       if (s != NULL) {
+               if (s->handle != NULL)
+                       sio_close(s->handle);
+               free(s);
+       }
        return SA_SUCCESS;
 }
 

Reply via email to