diff options
author | Jason E. Hale <jhale@FreeBSD.org> | 2024-02-12 00:55:48 +0000 |
---|---|---|
committer | Jason E. Hale <jhale@FreeBSD.org> | 2024-02-12 01:15:06 +0000 |
commit | 6b1f5719dd7aba9a7e0c34757f2b7ea3a191f6ec (patch) | |
tree | fcb8a61b662b17ddbe7a6dee31f992ac10cab839 | |
parent | fe83fce89b6909c3c332c38011cb9f8693707069 (diff) | |
download | ports-6b1f5719dd7aba9a7e0c34757f2b7ea3a191f6ec.tar.gz ports-6b1f5719dd7aba9a7e0c34757f2b7ea3a191f6ec.zip |
math/readstat: Update to 1.1.9
MFH: 2024Q1
Security: 388eefc0-c93f-11ee-92ce-4ccc6adda413
(cherry picked from commit 013b958d94ac91a14d3d6b2b3db24c1ce88ee7ed)
-rw-r--r-- | math/readstat/Makefile | 8 | ||||
-rw-r--r-- | math/readstat/distinfo | 6 | ||||
-rw-r--r-- | math/readstat/files/patch-src_readstat__bits.h | 11 | ||||
-rw-r--r-- | math/readstat/files/patch-src_readstat__variable.c | 10 | ||||
-rw-r--r-- | math/readstat/files/patch-src_sas_ieee.c | 11 | ||||
-rw-r--r-- | math/readstat/files/patch-src_spss_readstat__por.h | 11 | ||||
-rw-r--r-- | math/readstat/files/patch-src_spss_readstat__sav__read.c | 24 |
7 files changed, 35 insertions, 46 deletions
diff --git a/math/readstat/Makefile b/math/readstat/Makefile index 6d2174c3f1b6..56d685cbde7f 100644 --- a/math/readstat/Makefile +++ b/math/readstat/Makefile @@ -1,6 +1,5 @@ PORTNAME= readstat -DISTVERSION= 1.1.8 -PORTREVISION= 4 +DISTVERSION= 1.1.9 CATEGORIES= math kde MASTER_SITES= https://github.com/WizardMac/ReadStat/releases/download/v${DISTVERSION}/ @@ -10,9 +9,10 @@ WWW= https://github.com/WizardMac/ReadStat LICENSE= MIT -USES= libtool -HAS_CONFIGURE= yes +USES= cpe libtool +CPE_VENDOR= wizardmac +HAS_CONFIGURE= yes CFLAGS+= -Werror -Wstrict-prototypes .include <bsd.port.mk> diff --git a/math/readstat/distinfo b/math/readstat/distinfo index 569b483c82ee..70f4370f596b 100644 --- a/math/readstat/distinfo +++ b/math/readstat/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1661500384 -SHA256 (readstat-1.1.8.tar.gz) = b18a0d68059d9665491e53838b3ca89b06c3bdaa3b0a11d4ba87d830b743e178 -SIZE (readstat-1.1.8.tar.gz) = 615498 +TIMESTAMP = 1707695225 +SHA256 (readstat-1.1.9.tar.gz) = 3a232b9e852d10173e2f25da9155afe2e129a30d1fc6c9aac142cdc5cbfe527e +SIZE (readstat-1.1.9.tar.gz) = 617234 diff --git a/math/readstat/files/patch-src_readstat__bits.h b/math/readstat/files/patch-src_readstat__bits.h deleted file mode 100644 index 83dde0c07762..000000000000 --- a/math/readstat/files/patch-src_readstat__bits.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/readstat_bits.h.orig 2023-02-19 12:35:46 UTC -+++ src/readstat_bits.h -@@ -7,7 +7,7 @@ - #undef READSTAT_MACHINE_IS_TWOS_COMPLEMENT - #define READSTAT_MACHINE_IS_TWOS_COMPLEMENT 0 - --int machine_is_little_endian(); -+int machine_is_little_endian(void); - - char ones_to_twos_complement1(char num); - int16_t ones_to_twos_complement2(int16_t num); diff --git a/math/readstat/files/patch-src_readstat__variable.c b/math/readstat/files/patch-src_readstat__variable.c index 4bc2fe0c7ad8..73e615cf5a32 100644 --- a/math/readstat/files/patch-src_readstat__variable.c +++ b/math/readstat/files/patch-src_readstat__variable.c @@ -1,11 +1,7 @@ ---- src/readstat_variable.c.orig 2020-08-25 16:29:50 UTC +--- src/readstat_variable.c.orig 2023-02-20 19:09:20 UTC +++ src/readstat_variable.c -@@ -2,10 +2,10 @@ - #include <stdlib.h> - #include "readstat.h" - --static readstat_value_t make_blank_value(); -+static readstat_value_t make_blank_value(void); +@@ -5,7 +5,7 @@ static readstat_value_t make_double_value(double dval) + static readstat_value_t make_blank_value(void); static readstat_value_t make_double_value(double dval); -static readstat_value_t make_blank_value() { diff --git a/math/readstat/files/patch-src_sas_ieee.c b/math/readstat/files/patch-src_sas_ieee.c index 40efd45c642b..de19ae677fec 100644 --- a/math/readstat/files/patch-src_sas_ieee.c +++ b/math/readstat/files/patch-src_sas_ieee.c @@ -1,14 +1,5 @@ ---- src/sas/ieee.c.orig 2018-12-15 15:27:55 UTC +--- src/sas/ieee.c.orig 2023-02-20 19:09:20 UTC +++ src/sas/ieee.c -@@ -16,7 +16,7 @@ static void ieee2xpt(unsigned char *ieee, unsigned cha - - #ifndef FLOATREP - #define FLOATREP get_native() --int get_native(); -+int get_native(void); - #endif - - void memreverse(void *intp_void, int l) { @@ -96,7 +96,7 @@ int cnxptiee(const void *from_bytes, int fromtype, voi return(0); } diff --git a/math/readstat/files/patch-src_spss_readstat__por.h b/math/readstat/files/patch-src_spss_readstat__por.h deleted file mode 100644 index 7649ac223461..000000000000 --- a/math/readstat/files/patch-src_spss_readstat__por.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/spss/readstat_por.h.orig 2023-02-19 12:38:04 UTC -+++ src/spss/readstat_por.h -@@ -31,7 +31,7 @@ typedef struct por_ctx_s { - ck_hash_table_t *var_dict; - } por_ctx_t; - --por_ctx_t *por_ctx_init(); -+por_ctx_t *por_ctx_init(void); - void por_ctx_free(por_ctx_t *ctx); - ssize_t por_utf8_encode(const unsigned char *input, size_t input_len, - char *output, size_t output_len, uint16_t lookup[256]); diff --git a/math/readstat/files/patch-src_spss_readstat__sav__read.c b/math/readstat/files/patch-src_spss_readstat__sav__read.c new file mode 100644 index 000000000000..e1dc93a378c3 --- /dev/null +++ b/math/readstat/files/patch-src_spss_readstat__sav__read.c @@ -0,0 +1,24 @@ +From d9b3c922d664d03100b9f37da129b382054ea3b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= <csardi.gabor@gmail.com> +Date: Fri, 9 Feb 2024 18:31:01 -0500 +Subject: [PATCH] Fix a buffer overflow + +It happens if raw_str_used underflows and ends up a very large number, +which is then used as the size of a string. + +Closes #285. + +https://github.com/WizardMac/ReadStat/issues/285 +https://github.com/WizardMac/ReadStat/pull/311 + +--- src/spss/readstat_sav_read.c.orig 2023-01-15 21:33:14 UTC ++++ src/spss/readstat_sav_read.c +@@ -717,7 +717,7 @@ static readstat_error_t sav_process_row(unsigned char + } + if (++offset == col_info->width) { + if (++segment_offset < var_info->n_segments) { +- raw_str_used--; ++ if (raw_str_used > 0) raw_str_used--; + } + offset = 0; + col++; |