2010-12-10 09:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hblzf/hblzf.c
! Fixed against trying to allocate negative size.
(it _will_ result in compile time warning. Don't report it)
This commit is contained in:
@@ -16,6 +16,11 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-12-10 09:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hblzf/hblzf.c
|
||||
! Fixed against trying to allocate negative size.
|
||||
(it _will_ result in compile time warning. Don't report it)
|
||||
|
||||
2010-12-10 09:50 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hblzf/hblzf.c
|
||||
* contrib/hblzf/tests/test.prg
|
||||
|
||||
@@ -103,6 +103,9 @@ HB_FUNC( LZF_COMPRESS )
|
||||
in_len = hb_itemGetCLen( pArg );
|
||||
out_len = in_len + ( delta ? delta : ( ( HB_SIZE ) ( in_len * 1.04 ) + 1 ) );
|
||||
|
||||
if( out_len < 0 )
|
||||
out_len = 0;
|
||||
|
||||
out_data = ( char * ) hb_xgrab( out_len + 1 );
|
||||
|
||||
uiResult = lzf_compress( in_data, in_len, out_data, out_len );
|
||||
|
||||
Reference in New Issue
Block a user