tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
glibc: fix cve-2015-7547.patch so it applies cleanly
Nathan Zadoks
10 years ago
fc48bf5a
c98602d2
+6
-2
1 changed file
expand all
collapse all
unified
split
pkgs
development
libraries
glibc
cve-2015-7547.patch
+6
-2
pkgs/development/libraries/glibc/cve-2015-7547.patch
···
316
- // int anssiz = *anssizp;
317
- HEADER *anhp = (HEADER *) ans;
318
+ HEADER *anhp = (HEADER *) *ansp;
319
-
struct sockaddr *nsap = get_nsaddr (statp, ns);
320
int truncating, connreset, n;
321
/* On some architectures compiler might emit a warning indicating
322
@@ -731,6 +817,8 @@ send_vc(res_state statp,
···
328
int recvresp2 = buf2 == NULL;
329
uint16_t rlen16;
330
read_len:
331
-
@@ -767,36 +855,14 @@ send_vc(res_state statp,
332
u_char **thisansp;
333
int *thisresplenp;
334
if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
···
344
- /* No buffer allocated for the first
345
- reply. We can try to use the rest
346
- of the user-provided buffer. */
0
347
- DIAG_PUSH_NEEDS_COMMENT;
348
- DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
0
349
-#if _STRING_ARCH_unaligned
350
- *anssizp2 = orig_anssizp - resplen;
351
- *ansp2 = *ansp + resplen;
···
356
- *anssizp2 = orig_anssizp - aligned_resplen;
357
- *ansp2 = *ansp + aligned_resplen;
358
-#endif
0
359
- DIAG_POP_NEEDS_COMMENT;
0
360
- } else {
361
- /* The first reply did not fit into the
362
- user-provided buffer. Maybe the second
···
316
- // int anssiz = *anssizp;
317
- HEADER *anhp = (HEADER *) ans;
318
+ HEADER *anhp = (HEADER *) *ansp;
319
+
struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
320
int truncating, connreset, n;
321
/* On some architectures compiler might emit a warning indicating
322
@@ -731,6 +817,8 @@ send_vc(res_state statp,
···
328
int recvresp2 = buf2 == NULL;
329
uint16_t rlen16;
330
read_len:
331
+
@@ -767,40 +855,14 @@ send_vc(res_state statp,
332
u_char **thisansp;
333
int *thisresplenp;
334
if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
···
344
- /* No buffer allocated for the first
345
- reply. We can try to use the rest
346
- of the user-provided buffer. */
347
+
-#if __GNUC_PREREQ (4, 7)
348
- DIAG_PUSH_NEEDS_COMMENT;
349
- DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
350
+
-#endif
351
-#if _STRING_ARCH_unaligned
352
- *anssizp2 = orig_anssizp - resplen;
353
- *ansp2 = *ansp + resplen;
···
358
- *anssizp2 = orig_anssizp - aligned_resplen;
359
- *ansp2 = *ansp + aligned_resplen;
360
-#endif
361
+
-#if __GNUC_PREREQ (4, 7)
362
- DIAG_POP_NEEDS_COMMENT;
363
+
-#endif
364
- } else {
365
- /* The first reply did not fit into the
366
- user-provided buffer. Maybe the second