svnno****@sourc*****
svnno****@sourc*****
2009年 2月 11日 (水) 14:47:01 JST
Revision: 110 http://svn.sourceforge.jp/view?root=swfed&view=rev&rev=110 Author: yoya Date: 2009-02-11 14:47:01 +0900 (Wed, 11 Feb 2009) Log Message: ----------- Losslessデータ作成時の変数の初期化漏れを修正 (compress で格納先buff のデータ長指定) Modified Paths: -------------- trunk/src/swf_tag_lossless.c -------------- next part -------------- Modified: trunk/src/swf_tag_lossless.c =================================================================== --- trunk/src/swf_tag_lossless.c 2009-02-10 01:31:36 UTC (rev 109) +++ trunk/src/swf_tag_lossless.c 2009-02-11 05:47:01 UTC (rev 110) @@ -233,7 +233,8 @@ indices_len); old_buff_ref = bitstream_buffer(bs2, 0); old_size = bitstream_length(bs2); - tmp_buff = malloc(old_size); // too enough size + compsize = old_size; + tmp_buff = malloc(compsize); compress(tmp_buff, &compsize, old_buff_ref, old_size); bitstream_putstring(bs, tmp_buff, compsize); bitstream_close(bs2); @@ -256,7 +257,7 @@ } old_buff_ref = bitstream_buffer(bs2, 0); old_size = bitstream_length(bs2); - compsize = old_size; // too enough size + compsize = old_size; tmp_buff = malloc(compsize); compress(tmp_buff, &compsize, old_buff_ref, old_size); bitstream_putstring(bs, tmp_buff, compsize);