emile - use newer lz4 api instead of deprecated one
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 7 Aug 2019 10:44:05 +0000 (11:44 +0100)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Mon, 12 Aug 2019 07:24:30 +0000 (16:24 +0900)
src/lib/emile/emile_compress.c

index e744d3f..783e00b 100644 (file)
@@ -106,10 +106,11 @@ emile_expand(const Eina_Binbuf *in, Eina_Binbuf *out, Emile_Compressor_Type t)
       {
          int ret;
 
-         ret = LZ4_decompress_fast((const char *)eina_binbuf_string_get(in),
+         ret = LZ4_decompress_safe((const char *)eina_binbuf_string_get(in),
                                    (char *)eina_binbuf_string_get(out),
+                                   eina_binbuf_length_get(in),
                                    eina_binbuf_length_get(out));
-         if ((unsigned int)ret != eina_binbuf_length_get(in))
+         if ((unsigned int)ret != eina_binbuf_length_get(out))
            return EINA_FALSE;
          break;
       }