dnsmasq: update to 2.81.

This commit is contained in:
mobinmob 2020-04-15 19:27:10 +03:00 committed by Helmut Pozimski
parent 5c65d5c4db
commit f518e3ad98
3 changed files with 4 additions and 90 deletions

View file

@ -1,45 +0,0 @@
From 69bc94779c2f035a9fffdb5327a54c3aeca73ed5 Mon Sep 17 00:00:00 2001
From: Simon Kelley <simon@thekelleys.org.uk>
Date: Wed, 14 Aug 2019 20:44:50 +0100
Subject: [PATCH] Fix memory leak in helper.c
Thanks to Xu Mingjie <xumingjie1995@outlook.com> for spotting this.
---
src/helper.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/helper.c b/src/helper.c
index 33ba120..c392eec 100644
--- src/helper.c
+++ src/helper.c
@@ -80,7 +80,8 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd)
pid_t pid;
int i, pipefd[2];
struct sigaction sigact;
-
+ unsigned char *alloc_buff = NULL;
+
/* create the pipe through which the main program sends us commands,
then fork our process. */
if (pipe(pipefd) == -1 || !fix_fd(pipefd[1]) || (pid = fork()) == -1)
@@ -186,11 +187,16 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd)
struct script_data data;
char *p, *action_str, *hostname = NULL, *domain = NULL;
unsigned char *buf = (unsigned char *)daemon->namebuff;
- unsigned char *end, *extradata, *alloc_buff = NULL;
+ unsigned char *end, *extradata;
int is6, err = 0;
int pipeout[2];
- free(alloc_buff);
+ /* Free rarely-allocated memory from previous iteration. */
+ if (alloc_buff)
+ {
+ free(alloc_buff);
+ alloc_buff = NULL;
+ }
/* we read zero bytes when pipe closed: this is our signal to exit */
if (!read_write(pipefd[0], (unsigned char *)&data, sizeof(data), 1))
--
1.7.10.4

View file

@ -1,42 +0,0 @@
From: Vladislav Grishenko <themiron@mail.ru>
Date: Wed, 26 Jun 2019 15:27:11 +0000 (+0500)
Subject: Fix build with libnettle 3.5
X-Git-Url: http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commitdiff_plain;h=ab73a746a0d6fcac2e682c5548eeb87fb9c9c82e;hp=69bc94779c2f035a9fffdb5327a54c3aeca73ed5
Fix build with libnettle 3.5
---
diff --git a/src/crypto.c b/src/crypto.c
index ebb871e..fecc64a 100644
--- src/crypto.c
+++ src/crypto.c
@@ -275,6 +275,10 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
static struct ecc_point *key_256 = NULL, *key_384 = NULL;
static mpz_t x, y;
static struct dsa_signature *sig_struct;
+#if NETTLE_VERSION_MAJOR == 3 && NETTLE_VERSION_MINOR < 4
+#define nettle_get_secp_256r1() (&nettle_secp_256r1)
+#define nettle_get_secp_384r1() (&nettle_secp_384r1)
+#endif
if (!sig_struct)
{
@@ -294,7 +298,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
if (!(key_256 = whine_malloc(sizeof(struct ecc_point))))
return 0;
- nettle_ecc_point_init(key_256, &nettle_secp_256r1);
+ nettle_ecc_point_init(key_256, nettle_get_secp_256r1());
}
key = key_256;
@@ -307,7 +311,7 @@ static int dnsmasq_ecdsa_verify(struct blockdata *key_data, unsigned int key_len
if (!(key_384 = whine_malloc(sizeof(struct ecc_point))))
return 0;
- nettle_ecc_point_init(key_384, &nettle_secp_384r1);
+ nettle_ecc_point_init(key_384, nettle_get_secp_384r1());
}
key = key_384;

View file

@ -1,7 +1,7 @@
# Template file for 'dnsmasq'
pkgname=dnsmasq
version=2.80
revision=7
version=2.81
revision=1
conf_files="/etc/dnsmasq.conf"
hostmakedepends="pkg-config"
makedepends="dbus-devel libcap-devel libidn2-devel $(vopt_if dnssec nettle-devel)"
@ -9,8 +9,9 @@ short_desc="Lightweight, easy to configure DNS forwarder and DHCP server"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="http://www.thekelleys.org.uk/dnsmasq/doc.html"
changelog="http://www.thekelleys.org.uk/dnsmasq/CHANGELOG"
distfiles="http://www.thekelleys.org.uk/${pkgname}/${pkgname}-${version}.tar.gz"
checksum=9e4a58f816ce0033ce383c549b7d4058ad9b823968d352d2b76614f83ea39adc
checksum=3c28c68c6c2967c3a96e9b432c0c046a5df17a426d3a43cffe9e693cf05804d0
system_accounts="dnsmasq"
dnsmasq_homedir="/var/chroot"