1 From 3c23a7863c0b01273d4c36423769443ea7e4a7bb Mon Sep 17 00:00:00 2001
2 From: David Woodhouse <dwmw2@infradead.org>
3 Date: Fri, 5 Jun 2020 15:02:41 +0100
4 Subject: [PATCH 1/2] unzip: reduce file name size to 65535 to work with
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 The external minizip project has changed the unzGetCurrentFileInfo()
11 function to take a uint16_t as the filename size, instead of a uLong
12 as in the original version in zlib.
14 (Reported as https://github.com/nmoinvaz/minizip/issues/490 but it
15 was 3½ years ago and might be too late to fix it now, although changing
16 it back to a *larger* type is a lot safer than reducing the size, and
19 This means that our 65536-byte buffer gets truncated to zero, as the
20 compiler tells us when we build agaisnt the external minizip:
22 domoticz/main/unzip_stream.h:140:50: warning: conversion from ‘long unsigned int’ to ‘uint16_t’ {aka ‘short unsigned int’} changes value from ‘65536’ to ‘0’ [-Woverflow]
23 140 | unzGetCurrentFileInfo(handler_, &info, path, sizeof(path), NULL, 0, NULL, 0);
26 Reduce the buffer size to 65535 bytes instead.
28 main/unzip_stream.h | 2 +-
29 1 file changed, 1 insertion(+), 1 deletion(-)
31 diff --git a/main/unzip_stream.h b/main/unzip_stream.h
32 index 136fcefd9..813f2489a 100644
33 --- a/main/unzip_stream.h
34 +++ b/main/unzip_stream.h
35 @@ -135,7 +135,7 @@ namespace clx {
36 basic_unzip_stream& open(handler_type h) {
42 unzGetCurrentFileInfo(handler_, &info, path, sizeof(path), NULL, 0, NULL, 0);