summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorNathan Zadoks <nathan@nathan7.eu>2016-02-16 17:22:51 +0100
committerNathan Zadoks <nathan@nathan7.eu>2016-02-16 17:23:35 +0100
commitfc48bf5a2ceb908b73dc035374e2ec5a31086aa2 (patch)
treeb0dc94e46d13143f89fb988cd1bc8290cfd416a5 /pkgs
parentc98602d28102624726e80b59c17fc9d36f62ab54 (diff)
downloadnixlib-fc48bf5a2ceb908b73dc035374e2ec5a31086aa2.tar
nixlib-fc48bf5a2ceb908b73dc035374e2ec5a31086aa2.tar.gz
nixlib-fc48bf5a2ceb908b73dc035374e2ec5a31086aa2.tar.bz2
nixlib-fc48bf5a2ceb908b73dc035374e2ec5a31086aa2.tar.lz
nixlib-fc48bf5a2ceb908b73dc035374e2ec5a31086aa2.tar.xz
nixlib-fc48bf5a2ceb908b73dc035374e2ec5a31086aa2.tar.zst
nixlib-fc48bf5a2ceb908b73dc035374e2ec5a31086aa2.zip
glibc: fix cve-2015-7547.patch so it applies cleanly
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/glibc/cve-2015-7547.patch8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/development/libraries/glibc/cve-2015-7547.patch b/pkgs/development/libraries/glibc/cve-2015-7547.patch
index 1f10aafe0c05..9bf0bcc388cb 100644
--- a/pkgs/development/libraries/glibc/cve-2015-7547.patch
+++ b/pkgs/development/libraries/glibc/cve-2015-7547.patch
@@ -316,7 +316,7 @@ index a968b95..21843f1 100644
 -	// int anssiz = *anssizp;
 -	HEADER *anhp = (HEADER *) ans;
 +	HEADER *anhp = (HEADER *) *ansp;
- 	struct sockaddr *nsap = get_nsaddr (statp, ns);
+	struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
  	int truncating, connreset, n;
  	/* On some architectures compiler might emit a warning indicating
 @@ -731,6 +817,8 @@ send_vc(res_state statp,
@@ -328,7 +328,7 @@ index a968b95..21843f1 100644
  	int recvresp2 = buf2 == NULL;
  	uint16_t rlen16;
   read_len:
-@@ -767,36 +855,14 @@ send_vc(res_state statp,
+@@ -767,40 +855,14 @@ send_vc(res_state statp,
  	u_char **thisansp;
  	int *thisresplenp;
  	if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
@@ -344,8 +344,10 @@ index a968b95..21843f1 100644
 -			/* No buffer allocated for the first
 -			   reply.  We can try to use the rest
 -			   of the user-provided buffer.  */
+-#if __GNUC_PREREQ (4, 7)
 -			DIAG_PUSH_NEEDS_COMMENT;
 -			DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
+-#endif
 -#if _STRING_ARCH_unaligned
 -			*anssizp2 = orig_anssizp - resplen;
 -			*ansp2 = *ansp + resplen;
@@ -356,7 +358,9 @@ index a968b95..21843f1 100644
 -			*anssizp2 = orig_anssizp - aligned_resplen;
 -			*ansp2 = *ansp + aligned_resplen;
 -#endif
+-#if __GNUC_PREREQ (4, 7)
 -			DIAG_POP_NEEDS_COMMENT;
+-#endif
 -		} else {
 -			/* The first reply did not fit into the
 -			   user-provided buffer.  Maybe the second