diff --git a/pkgs/development/libraries/glibc/cve-2015-7547.patch b/pkgs/development/libraries/glibc/cve-2015-7547.patch index 1f10aafe0c0..9bf0bcc388c 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