From 364ed8f0a48b9fd74cf73d4e0404385f7c22da84 Mon Sep 17 00:00:00 2001 From: Paul Wouters Date: Oct 06 2020 01:36:04 +0000 Subject: - Workaround for s390x strcpy issues in mempool.c --- diff --git a/validns-0.8-s390-mempool.patch b/validns-0.8-s390-mempool.patch new file mode 100644 index 0000000..6cad683 --- /dev/null +++ b/validns-0.8-s390-mempool.patch @@ -0,0 +1,22 @@ +diff -Naur validns-0.8-orig/mempool.c validns-0.8/mempool.c +--- validns-0.8-orig/mempool.c 2014-02-11 15:47:03.000000000 -0500 ++++ validns-0.8/mempool.c 2020-10-05 20:53:47.014892762 -0400 +@@ -91,12 +91,16 @@ + + char *quickstrdup(char *s) + { ++ if (s == NULL) ++ return NULL; + char *r = getmem(strlen(s)+1); +- return strcpy(r, s); ++ return strncpy(r, s, strlen(r) -1); + } + + char *quickstrdup_temp(char *s) + { ++ if (s == NULL) ++ return NULL; + char *r = getmem_temp(strlen(s)+1); +- return strcpy(r, s); ++ return strncpy(r, s, strlen(r) -1); + } diff --git a/validns.spec b/validns.spec index 2e4192f..319b178 100644 --- a/validns.spec +++ b/validns.spec @@ -7,11 +7,14 @@ Release: 18%{?dist} License: BSD Url: http://www.validns.net/ Source: http://www.validns.net/download/%{name}-%{version}.tar.gz + Patch1: validns-0.8-Wformat-truncation.patch Patch2: validns-0.8-git20160720.patch Patch3: validns-0.8-Makefile.patch Patch4: validns-0.8-openssl-1.1.patch Patch5: validns-0.8-timing.patch +Patch6: validns-0.8-s390-mempool.patch + BuildRequires: gcc BuildRequires: Judy-devel, openssl-devel @@ -43,6 +46,7 @@ cp -a validns.1.gz %{buildroot}/%{_mandir}/man1/ - Resolves: rhbz#1880829 F34FailsToInstall: validns - Updated notiming patch (-x) notiming patch (-x) - Pulled in git20160720 updates +- Workaround for s390x strcpy issues in mempool.c * Mon Oct 5 17:03:05 EDT 2020 Paul Wouters - 0.8-17 - Port to openssl-1.1 based on github and https://github.com/tobez/validns/pull/64