gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/swf/tag_loaders.cpp


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/swf/tag_loaders.cpp
Date: Thu, 13 Dec 2007 11:40:13 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/12/13 11:40:13

Modified files:
        .              : ChangeLog 
        server/swf     : tag_loaders.cpp 

Log message:
        (jpeg_tables_loader): don't limit StreamAdapter input as the *same* jpeg
        loader will be used to parse subsequent tags. This reintroduces possible
        seek-backs but fixes regressions in elvis.swf and strip.swf (bug 
#21786).
        We'll need to rethink the robustness issue for jpeg loading.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5160&r2=1.5161
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/tag_loaders.cpp?cvsroot=gnash&r1=1.169&r2=1.170

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5160
retrieving revision 1.5161
diff -u -b -r1.5160 -r1.5161
--- ChangeLog   13 Dec 2007 10:58:10 -0000      1.5160
+++ ChangeLog   13 Dec 2007 11:40:12 -0000      1.5161
@@ -1,5 +1,13 @@
 2007-12-13 Sandro Santilli <address@hidden>
 
+       * server/swf/tag_loaders.cpp (jpeg_tables_loader): don't limit
+         StreamAdapter input as the *same* jpeg loader will be used
+         to parse subsequent tags. This reintroduces possible seek-backs
+         but fixes regressions in elvis.swf and strip.swf (bug #21786).
+         We'll need to rethink the robustness issue for jpeg loading.
+
+2007-12-13 Sandro Santilli <address@hidden>
+
        * server/parser/action_buffer.{cpp,h}: drop readFullTag(),
          get additional arg to read() to limit input stream.
        * server/parser/button_character_def.{cpp,h}: limit input

Index: server/swf/tag_loaders.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/swf/tag_loaders.cpp,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -b -r1.169 -r1.170
--- server/swf/tag_loaders.cpp  12 Dec 2007 20:40:35 -0000      1.169
+++ server/swf/tag_loaders.cpp  13 Dec 2007 11:40:13 -0000      1.170
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: tag_loaders.cpp,v 1.169 2007/12/12 20:40:35 strk Exp $ */
+/* $Id: tag_loaders.cpp,v 1.170 2007/12/13 11:40:13 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -245,7 +245,18 @@
 
     try
     {
-        std::auto_ptr<tu_file> ad( StreamAdapter::getFile(*in, endPos) );
+       // NOTE: we can NOT limit input stream here as the same jpeg::input
+       // instance will be used for reading subsequent DEFINEBITS and similar
+       // tags, which are *different* tags, so have different boundaries !!
+       //
+       // What we'll need to do is add boundary checking in 
jpeg::input::createXXX
+       // directly, which would use the tu_file adapter which should 
supposedly 
+       // share the same position as the underlying gnash::stream
+       //
+       // For now we'll just set the limit to max unsigned long value.
+       // This fixes elvis.swf, strip.swf and gansta_rap_se.swf (and who knows 
which others)
+       //
+        std::auto_ptr<tu_file> ad( StreamAdapter::getFile(*in, 
std::numeric_limits<unsigned long>::max()) );
         //  transfer ownerhip to the jpeg::input
         j_in.reset(jpeg::input::create_swf_jpeg2_header_only(ad.release(), 
true));
 




reply via email to

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