SOURCES: gplflash2-segv.patch (NEW) - new
arekm
arekm at pld-linux.org
Fri Sep 30 20:02:01 CEST 2005
Author: arekm Date: Fri Sep 30 18:01:57 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- new
---- Files affected:
SOURCES:
gplflash2-segv.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/gplflash2-segv.patch
diff -u /dev/null SOURCES/gplflash2-segv.patch:1.1
--- /dev/null Fri Sep 30 20:01:57 2005
+++ SOURCES/gplflash2-segv.patch Fri Sep 30 20:01:52 2005
@@ -0,0 +1,57 @@
+diff -urbB gplflash2/lib/swf_decoder.cc gplflash2.cvs/lib/swf_decoder.cc
+--- gplflash2/lib/swf_decoder.cc 2005-08-28 11:31:14.000000000 +0200
++++ gplflash2.cvs/lib/swf_decoder.cc 2005-09-30 19:55:04.000000000 +0200
+@@ -26,6 +26,10 @@
+ * Decode a bloc of data passed by the browser/flashplayer
+ **/
+ bool Swf_decoder::readStream(char *data,unsigned int size) {
++
++ // make sure we got the complete header at the first call
++ if (needHeader && size < 22) return false;
++
+ // First call
+ if (needHeader && size > 21) {
+ // Initialize the header
+diff -urbB gplflash2/lib/swf_engine.cc gplflash2.cvs/lib/swf_engine.cc
+--- gplflash2/lib/swf_engine.cc 2005-08-28 11:31:14.000000000 +0200
++++ gplflash2.cvs/lib/swf_engine.cc 2005-09-30 19:55:04.000000000 +0200
+@@ -18,7 +18,6 @@
+ **/
+ #include "swf_engine.hh"
+ #include "maths.hh"
+-#include "uncompress.hh"
+ #include "ASLib/as_movie_clip.hh"
+ #include "ASLib/as_text_field.hh"
+ #include "ASLib/as_video.hh"
+@@ -30,6 +29,7 @@
+ #include "ogl_renderer.hh"
+ #include "ogl_texture.hh"
+ #include "ogl_graphics.hh"
++#include "uncompress.hh"
+
+ extern bool debug;
+
+diff -urbB gplflash2/player/flashplayer.cc gplflash2.cvs/player/flashplayer.cc
+--- gplflash2/player/flashplayer.cc 2005-08-28 11:31:14.000000000 +0200
++++ gplflash2.cvs/player/flashplayer.cc 2005-09-30 19:55:04.000000000 +0200
+@@ -47,7 +47,7 @@
+ lstat(fileName, &buf);
+ FILE *f = fopen(fileName,"rb");
+ if (f == NULL) {
+- wcout << "FILE NOT FOUND!";
++ wcout << "FILE NOT FOUND!\n";
+ return false;
+ }
+ char *buffer = (char*) malloc(buf.st_size);
+@@ -256,7 +256,9 @@
+ Swf_decoder * decoder = new Swf_decoder();
+ int ret = openDecodeStream(fileName, decoder);
+ if (ret == 0) {
+- cout << "Decoding fails!\n. Bye.";
++ cout << "Decoding fails!\nBye.\n";
++ delete decoder;
++ return 1;
+ }
+ render(decoder,normalSpeed);
+ return 0;
+
================================================================
More information about the pld-cvs-commit
mailing list