From 0a91da884d62d4cb53ff1d9e09b465f894d20605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20La=C3=9F?= Date: Sat, 9 Sep 2023 12:12:38 +0200 Subject: [PATCH] openntpd: fix integer overflow on i686 --- srcpkgs/openntpd/patches/fix-time_t-overflow.patch | 12 ++++++++++++ srcpkgs/openntpd/template | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/openntpd/patches/fix-time_t-overflow.patch diff --git a/srcpkgs/openntpd/patches/fix-time_t-overflow.patch b/srcpkgs/openntpd/patches/fix-time_t-overflow.patch new file mode 100644 index 0000000000000..4afbf2ed0afb8 --- /dev/null +++ b/srcpkgs/openntpd/patches/fix-time_t-overflow.patch @@ -0,0 +1,12 @@ +--- a/src/constraint.c ++++ b/src/constraint.c +@@ -842,7 +842,7 @@ constraint_update(void) + /* calculate median */ + i = cnt / 2; + if (cnt % 2 == 0) +- conf->constraint_median = (values[i - 1] + values[i]) / 2; ++ conf->constraint_median = ((long long)values[i - 1] + values[i]) / 2; + else + conf->constraint_median = values[i]; + + diff --git a/srcpkgs/openntpd/template b/srcpkgs/openntpd/template index 3460b0fd34714..72c43ac0a9188 100644 --- a/srcpkgs/openntpd/template +++ b/srcpkgs/openntpd/template @@ -1,7 +1,7 @@ # Template file for 'openntpd' pkgname=openntpd version=6.8p1 -revision=4 +revision=5 build_style=gnu-configure configure_args="--with-privsep-user=openntpd --with-cacert=/etc/ssl/certs.pem" hostmakedepends="automake libtool"