From 13f0260beae851f7d5dd96e9ef757d8d6d7daac1 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sun, 9 Feb 2020 07:20:13 -0800 Subject: [PATCH] Fix false overlapped components detection on 32-bit systems. 32-bit systems with ZIP64_SUPPORT enabled could have different size types for zoff_t and zusz_t. That resulted in bad parameter passing to the bound tracking functions, itself due to the lack of use of C function prototypes in unzip. This commit assures that parameters are cast properly for those calls. This problem occurred only for ill-chosen make options, which give a 32-bit zoff_t. A proper build will result in a zoff_t of 64 bits, even on 32-bit systems. --- extract.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extract.c b/extract.c index 1b73cb0..d9866f9 100644 --- a/extract.c +++ b/extract.c @@ -329,7 +329,7 @@ static ZCONST char Far OverlappedComponents[] = /* A growable list of spans. */ -typedef zoff_t bound_t; +typedef zusz_t bound_t; typedef struct { bound_t beg; /* start of the span */ bound_t end; /* one past the end of the span */ @@ -518,7 +518,8 @@ int extract_or_test_files(__G) /* return PK-type error code */ return PK_MEM; } if ((G.extra_bytes != 0 && - cover_add((cover_t *)G.cover, 0, G.extra_bytes) != 0) || + cover_add((cover_t *)G.cover, + (bound_t)0, (bound_t)G.extra_bytes) != 0) || (G.ecrec.have_ecr64 && cover_add((cover_t *)G.cover, G.ecrec.ec64_start, G.ecrec.ec64_end) != 0) || @@ -1216,7 +1217,7 @@ static int extract_or_test_entrylist(__G__ numchunk, /* seek_zipf(__G__ pInfo->offset); */ request = G.pInfo->offset + G.extra_bytes; - if (cover_within((cover_t *)G.cover, request)) { + if (cover_within((cover_t *)G.cover, (bound_t)request)) { Info(slide, 0x401, ((char *)slide, LoadFarString(OverlappedComponents))); return PK_BOMB; />
path: root/gnu/tests/data/jami-dummy-account.dat
AgeCommit message (Expand)Author
2021-08-02Reinstate "services: Add a service for Jami."...This reverts commit 4673f817938d9d2b1b40a072ab2e0c44a32ccc97, which reverted commit 69dcc24c9f0cdfea674eb690e7755d26a25ced2b with the fix detailed below. Thanks to Christopher Baines for reporting the failure and proposing a fix. * guix/self.scm (compiled-guix) [*system-test-modules*]: Add the test data files via the 'extra-files' argument. * gnu/local.mk (dist_patch_DATA): Move the tests/data/jami-dummy-account.dat file to... * gnu/local.mk (MODULES_NOT_COMPILED): ... here. Maxim Cournoyer
2021-08-02Revert "services: Add a service for Jami."...This reverts commit 69dcc24c9f0cdfea674eb690e7755d26a25ced2b. It broke 'guix pull'. Maxim Cournoyer
2021-08-02services: Add a service for Jami....* gnu/services/telephony.scm (string-or-computed-file?) (string-list?, account-fingerprint-list?): New procedures. (maybe-string-list, maybe-account-fingerprint-list) (maybe-boolean, maybe-string, jami-account-list): New configuration field types. (serialize-string-list, serialize-boolean, serialize-string) (jami-account, jami-account->alist, jami-configuration) (jami-account-list?, jami-account-list-maybe): New procedures. (%jami-accounts): New variable. (jami-configuration->command-line-arguments): New procedure. (jami-dbus-session-activation, jami-shepherd-services): New procedures. (jami-service-type): New variable. * gnu/build/jami-service.scm: New file. * gnu/tests/data/jami-dummy-account.dat: Likewise. * gnu/tests/telephony.scm: Likewise. * gnu/local.mk (GNU_SYSTEM_MODULES): Register them. * Makefile.am (SCM_TESTS): Register the test file. (dist_patch_DATA): Register the new data file. * doc/guix.texi (Telephony Services): Document it. Maxim Cournoyer