From 7d1025deb3992308e55a8acce884af36253a10af Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Thu, 17 Oct 2019 17:19:25 +0000 Subject: [PATCH] some fixes, not working yet --- src/snapshot.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/snapshot.c b/src/snapshot.c index c926206..6113c01 100644 --- a/src/snapshot.c +++ b/src/snapshot.c @@ -154,12 +154,13 @@ defstream.avail_in = data_len+1; defstream.next_in = (unsigned char *)data; fprintf(stderr,"WAS HERE %d\n", data_len); - *compressed=(char *)malloc(data_len*sizeof(char *)); + char *compr=(char *)malloc(data_len*sizeof(char)); defstream.avail_out = data_len+1; - defstream.next_out = (unsigned char *)*compressed; + defstream.next_out = (unsigned char *)compr; deflateInit(&defstream, Z_BEST_COMPRESSION); deflate(&defstream, Z_FINISH); deflateEnd(&defstream); + *compressed=compr; return defstream.total_out; } -- Gitblit v1.9.3