CVSROOT: /sources/gnash Module name: gnash Changes by: Bastiaan Jacques <bjacques> 07/05/25 12:41:49
Modified files: . : ChangeLog server/swf : tag_loaders.cpp Log message: Move the assignment into the data pointer up to right after the corresponding memory is allocated, because the DO_{MONO,STEREO}_BLOCK macros use the temporary pointer to iterate the buffer. This was causing delete[] to be called on the pointer which had walked to the end of the buffer and, thus, crashing. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3353&r2=1.3354 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/tag_loaders.cpp?cvsroot=gnash&r1=1.110&r2=1.111 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.3353 retrieving revision 1.3354 diff -u -b -r1.3353 -r1.3354 --- ChangeLog 25 May 2007 11:54:10 -0000 1.3353 +++ ChangeLog 25 May 2007 12:41:48 -0000 1.3354 @@ -1,3 +1,12 @@ +2007-05-25 Bastiaan Jacques <[EMAIL PROTECTED]> + + * server/swf/tag_loaders.cpp: Move the assignment into the data + pointer up to right after the corresponding memory is allocated, + because the DO_{MONO,STEREO}_BLOCK macros use the temporary + pointer to iterate the buffer. This was causing delete[] to be + called on the pointer which had walked to the end of the buffer + and, thus, crashing. + 2007-05-25 Sandro Santilli <[EMAIL PROTECTED]> * server/sprite_instance.{cpp,h}: drop unused remove_display_item Index: server/swf/tag_loaders.cpp =================================================================== RCS file: /sources/gnash/gnash/server/swf/tag_loaders.cpp,v retrieving revision 1.110 retrieving revision 1.111 diff -u -b -r1.110 -r1.111 --- server/swf/tag_loaders.cpp 24 May 2007 20:10:42 -0000 1.110 +++ server/swf/tag_loaders.cpp 25 May 2007 12:41:48 -0000 1.111 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: tag_loaders.cpp,v 1.110 2007/05/24 20:10:42 strk Exp $ */ +/* $Id: tag_loaders.cpp,v 1.111 2007/05/25 12:41:48 bjacques Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1698,6 +1698,7 @@ bool stereo) { int16_t* out_data = new int16_t[stereo ? sample_count*2 : sample_count]; + data = reinterpret_cast<unsigned char *>(out_data); // Read header. int n_bits = in->read_uint(2) + 2; // 2 to 5 bits @@ -1754,7 +1755,6 @@ } } - data = (unsigned char *)out_data; } } // namespace gnash _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit