File: 0004-Fix-incompatible-pointer-types-warning-on-i686.patch

package info (click to toggle)
libpst 0.6.76-1.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,928 kB
  • sloc: ansic: 7,673; sh: 4,730; javascript: 1,950; cpp: 1,691; makefile: 137; xml: 3
file content (15 lines) | stat: -rw-r--r-- 877 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- a/src/libpst.c	2021-03-28 11:08:05.000000000 +1100
+++ b/src/libpst.c	2025-03-09 23:39:04.397180838 +1100
@@ -3828,9 +3828,9 @@ static size_t pst_read_block_size(pst_fi
         return -1;
     }
     *buf = (char *) pst_malloc(inflated_size);
-    size_t result_size = inflated_size;
-    if (uncompress((Bytef *) *buf, &result_size, (Bytef *) zbuf, size) != Z_OK || result_size != inflated_size) {
-        DEBUG_WARN(("Failed to uncompress %i bytes to %i bytes, got %i\n", size, inflated_size, result_size));
+    uLongf result_size = inflated_size;
+    if (uncompress((Bytef *) *buf, &result_size, (Bytef *) zbuf, size) != Z_OK || ((size_t) result_size) != inflated_size) {
+        DEBUG_WARN(("Failed to uncompress %i bytes to %i bytes, got %i\n", size, inflated_size, (size_t) result_size));
         if (zbuf) free(zbuf);
         DEBUG_RET();
         return -1;