gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash server/movie_instance.cpp ChangeLog


From: Sandro Santilli
Subject: [Gnash-commit] gnash server/movie_instance.cpp ChangeLog
Date: Tue, 15 May 2007 09:35:23 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/05/15 09:35:23

Modified files:
        server         : movie_instance.cpp 
        .              : ChangeLog 

Log message:
                * server/movie_instance.cpp (advance): safely handle movies
                  with 0 total frames (malformed SWF).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_instance.cpp?cvsroot=gnash&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3217&r2=1.3218

Patches:
Index: server/movie_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_instance.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- server/movie_instance.cpp   13 Apr 2007 07:35:55 -0000      1.10
+++ server/movie_instance.cpp   15 May 2007 09:35:22 -0000      1.11
@@ -61,7 +61,22 @@
        size_t nextframe = min(get_current_frame()+2, get_frame_count());
        if ( !_def->ensure_frame_loaded(nextframe) )
        {
-               log_error("Frame " SIZET_FMT " never loaded", nextframe);
+               IF_VERBOSE_MALFORMED_SWF(
+               log_swferror("Frame " SIZET_FMT " never loaded. Total frames: "
+                               SIZET_FMT ".", nextframe, get_frame_count());
+               );
+       }
+
+       // The parser might have reset the total frame count
+       // due to SWF malformation, so we check this *after*
+       // the ensure_frame_loaded call above.
+       //
+       if ( get_frame_count() == 0 )
+       {
+               IF_VERBOSE_MALFORMED_SWF(
+               log_swferror("The movie contains NO frames!");
+               );
+               return;
        }
 
        if (m_on_event_load_called == false)

Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3217
retrieving revision 1.3218
diff -u -b -r1.3217 -r1.3218
--- ChangeLog   15 May 2007 09:30:35 -0000      1.3217
+++ ChangeLog   15 May 2007 09:35:23 -0000      1.3218
@@ -1,5 +1,7 @@
 2007-05-15 Sandro Santilli <address@hidden>
 
+       * server/movie_instance.cpp (advance): safely handle movies 
+         with 0 total frames (malformed SWF).
        * gui/gui.cpp (advance_movie): handle no looping when the
          total frame count is 0 (malformed SWF).
        * server/dlist.cpp (swapDepth): fix an out-of-bound access.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]