From: <zu...@us...> - 2015-03-02 19:18:36
|
Revision: 5123 http://sourceforge.net/p/fuse-emulator/code/5123 Author: zubzero Date: 2015-03-02 19:18:29 +0000 (Mon, 02 Mar 2015) Log Message: ----------- Z80 snapshots: fix overallocation for uncompressed v2 data blocks Modified Paths: -------------- trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/z80.c Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2015-03-02 19:15:42 UTC (rev 5122) +++ trunk/libspectrum/hacking/ChangeLog 2015-03-02 19:18:29 UTC (rev 5123) @@ -979,3 +979,4 @@ szx.c,tape.c,tape_block.c,tzx_read.c,tzx_write.c: use libspectrum_new() and libspectrum_renew() macros where sizeof(elem) > 1 (Stuart). 20150302 libspectrum.in.h: fix ordering of args in libspectrum_new0() (Stuart). +20150302 z80.c: fix overallocation for uncompressed v2 data blocks (Stuart). Modified: trunk/libspectrum/z80.c =================================================================== --- trunk/libspectrum/z80.c 2015-03-02 19:15:42 UTC (rev 5122) +++ trunk/libspectrum/z80.c 2015-03-02 19:18:29 UTC (rev 5123) @@ -1105,7 +1105,7 @@ return LIBSPECTRUM_ERROR_CORRUPT; } - *block = libspectrum_malloc( 0x4000 * sizeof( *block ) ); + *block = libspectrum_malloc( 0x4000 * sizeof( **block ) ); memcpy( *block, buffer + 3, 0x4000 ); *length = 0x4000; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |