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:
Viktor Szakats
2010-12-10 09:00:09 +00:00
parent 15c3b055c9
commit 409ffccd9c
2 changed files with 8 additions and 0 deletions

View File

@@ -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

View File

@@ -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 );