]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Fix ZSTD_sizeof_CStream()
authorNick Terrell <terrelln@fb.com>
Wed, 8 Mar 2017 21:45:10 +0000 (13:45 -0800)
committerNick Terrell <terrelln@fb.com>
Wed, 8 Mar 2017 21:45:10 +0000 (13:45 -0800)
lib/compress/zstd_compress.c

index 432323e21e9544c63c68dd5e3c80e5d98fc6db21..85744b753689cdbd8058d753bdcb9d6e70ea4bd4 100644 (file)
@@ -3074,7 +3074,7 @@ size_t ZSTD_initCStream(ZSTD_CStream* zcs, int compressionLevel)
 size_t ZSTD_sizeof_CStream(const ZSTD_CStream* zcs)
 {
     if (zcs==NULL) return 0;   /* support sizeof on NULL */
-    return sizeof(zcs) + ZSTD_sizeof_CCtx(zcs->cctx) + ZSTD_sizeof_CDict(zcs->cdictLocal) + zcs->outBuffSize + zcs->inBuffSize;
+    return sizeof(*zcs) + ZSTD_sizeof_CCtx(zcs->cctx) + ZSTD_sizeof_CDict(zcs->cdictLocal) + zcs->outBuffSize + zcs->inBuffSize;
 }
 
 /*======   Compression   ======*/