New upstream version 1.1.3 which fixes some test problems.

This commit is contained in:
Richard W.M. Jones 2013-08-04 22:40:36 +01:00
parent 54a0400df2
commit 32ebeb90f6
3 changed files with 5 additions and 62 deletions

View File

@ -1,58 +0,0 @@
From 49c5ff9ad0316960f11b180715b3a6906d42be83 Mon Sep 17 00:00:00 2001
From: Michael Scherer <misc@zarb.org>
Date: Sun, 21 Jul 2013 21:59:28 +0100
Subject: [PATCH] 'struct sockaddr' is not large enough to store a general
sockaddr.
In particular, if IPv6 is used, then sizeof sockaddr_in6 > sizeof sockaddr,
resulting in a segfault:
https://bugzilla.redhat.com/show_bug.cgi?id=986601
RWMJ:
- Minor formatting
- Free tls->addr on normal exit path
---
src/tls.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/tls.c b/src/tls.c
index 08e8638..390b03e 100644
--- a/src/tls.c
+++ b/src/tls.c
@@ -54,7 +54,7 @@
struct tls {
const char *name; /* Can be NULL. */
size_t instance_num; /* Can be 0. */
- struct sockaddr addr;
+ struct sockaddr *addr;
socklen_t addrlen;
};
@@ -65,6 +65,7 @@ free_tls (void *tlsv)
{
struct tls *tls = tlsv;
+ free (tls->addr);
free (tls);
}
@@ -118,8 +119,13 @@ tls_set_sockaddr (struct sockaddr *addr, socklen_t addrlen)
struct tls *tls = pthread_getspecific (tls_key);
if (tls) {
- tls->addrlen = addrlen;
- memcpy (&tls->addr, addr, addrlen);
+ free(tls->addr);
+ tls->addr = calloc (1, addrlen);
+ if (tls->addr == NULL) {
+ perror ("calloc");
+ exit (EXIT_FAILURE);
+ }
+ memcpy(tls->addr, addr, addrlen);
}
}
--
1.8.3.1

View File

@ -1,8 +1,8 @@
%global _hardened_build 1
Name: nbdkit
Version: 1.1.2
Release: 5%{?dist}
Version: 1.1.3
Release: 1%{?dist}
Summary: NBD server
License: BSD
@ -207,7 +207,8 @@ make check
%changelog
* Sun Aug 4 2013 Richard W.M. Jones <rjones@redhat.com> - 1.1.2-5
* Sun Aug 4 2013 Richard W.M. Jones <rjones@redhat.com> - 1.1.3-1
- New upstream version 1.1.3 which fixes some test problems.
- Disable tests because Rawhide kernel is broken (RHBZ#991808).
- Remove a single quote from description which confused emacs.

View File

@ -1 +1 @@
4ca3f54caa3a53c298e9831f84af3430 nbdkit-1.1.2.tar.gz
d3bab589844243cd2572d02cb0b96a69 nbdkit-1.1.3.tar.gz