glibc: fix cve-2015-7547.patch so it applies cleanly
This commit is contained in:
parent
c98602d281
commit
fc48bf5a2c
@ -316,7 +316,7 @@ index a968b95..21843f1 100644
|
|||||||
- // int anssiz = *anssizp;
|
- // int anssiz = *anssizp;
|
||||||
- HEADER *anhp = (HEADER *) ans;
|
- HEADER *anhp = (HEADER *) ans;
|
||||||
+ HEADER *anhp = (HEADER *) *ansp;
|
+ HEADER *anhp = (HEADER *) *ansp;
|
||||||
struct sockaddr *nsap = get_nsaddr (statp, ns);
|
struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
|
||||||
int truncating, connreset, n;
|
int truncating, connreset, n;
|
||||||
/* On some architectures compiler might emit a warning indicating
|
/* On some architectures compiler might emit a warning indicating
|
||||||
@@ -731,6 +817,8 @@ send_vc(res_state statp,
|
@@ -731,6 +817,8 @@ send_vc(res_state statp,
|
||||||
@ -328,7 +328,7 @@ index a968b95..21843f1 100644
|
|||||||
int recvresp2 = buf2 == NULL;
|
int recvresp2 = buf2 == NULL;
|
||||||
uint16_t rlen16;
|
uint16_t rlen16;
|
||||||
read_len:
|
read_len:
|
||||||
@@ -767,36 +855,14 @@ send_vc(res_state statp,
|
@@ -767,40 +855,14 @@ send_vc(res_state statp,
|
||||||
u_char **thisansp;
|
u_char **thisansp;
|
||||||
int *thisresplenp;
|
int *thisresplenp;
|
||||||
if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
|
if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
|
||||||
@ -344,8 +344,10 @@ index a968b95..21843f1 100644
|
|||||||
- /* No buffer allocated for the first
|
- /* No buffer allocated for the first
|
||||||
- reply. We can try to use the rest
|
- reply. We can try to use the rest
|
||||||
- of the user-provided buffer. */
|
- of the user-provided buffer. */
|
||||||
|
-#if __GNUC_PREREQ (4, 7)
|
||||||
- DIAG_PUSH_NEEDS_COMMENT;
|
- DIAG_PUSH_NEEDS_COMMENT;
|
||||||
- DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
|
- DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
|
||||||
|
-#endif
|
||||||
-#if _STRING_ARCH_unaligned
|
-#if _STRING_ARCH_unaligned
|
||||||
- *anssizp2 = orig_anssizp - resplen;
|
- *anssizp2 = orig_anssizp - resplen;
|
||||||
- *ansp2 = *ansp + resplen;
|
- *ansp2 = *ansp + resplen;
|
||||||
@ -356,7 +358,9 @@ index a968b95..21843f1 100644
|
|||||||
- *anssizp2 = orig_anssizp - aligned_resplen;
|
- *anssizp2 = orig_anssizp - aligned_resplen;
|
||||||
- *ansp2 = *ansp + aligned_resplen;
|
- *ansp2 = *ansp + aligned_resplen;
|
||||||
-#endif
|
-#endif
|
||||||
|
-#if __GNUC_PREREQ (4, 7)
|
||||||
- DIAG_POP_NEEDS_COMMENT;
|
- DIAG_POP_NEEDS_COMMENT;
|
||||||
|
-#endif
|
||||||
- } else {
|
- } else {
|
||||||
- /* The first reply did not fit into the
|
- /* The first reply did not fit into the
|
||||||
- user-provided buffer. Maybe the second
|
- user-provided buffer. Maybe the second
|
||||||
|
Loading…
x
Reference in New Issue
Block a user