]> git.lizzy.rs Git - zlib.git/blobdiff - compress.c
Avoid a conversion error in gzseek when off_t type too small.
[zlib.git] / compress.c
index 85a96df1cbe1fa610bcdce4ca8c6cd7adea95d67..e2db404abf888bd2c85844985b5ae9784b955c63 100644 (file)
@@ -1,5 +1,5 @@
 /* compress.c -- compress a memory buffer
- * Copyright (C) 1995-2005, 2014 Jean-loup Gailly, Mark Adler
+ * Copyright (C) 1995-2005, 2014, 2016 Jean-loup Gailly, Mark Adler
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
@@ -28,7 +28,7 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
 {
     z_stream stream;
     int err;
-    const uInt max = -1;
+    const uInt max = (uInt)-1;
     uLong left;
 
     left = *destLen;