Explorar o código

fix out-of-bounds array access in pthread barriers on 64-bit

it's ok to overlap with integer slot 3 on 32-bit because only slots
0-2 are used on process-local barriers.
Rich Felker %!s(int64=12) %!d(string=hai) anos
pai
achega
9ae1cf6d29
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/internal/pthread_impl.h

+ 1 - 1
src/internal/pthread_impl.h

@@ -83,7 +83,7 @@ struct __timer {
 #define _b_limit __u.__i[2]
 #define _b_count __u.__i[3]
 #define _b_waiters2 __u.__i[4]
-#define _b_inst __u.__p[4]
+#define _b_inst __u.__p[3]
 
 #include "pthread_arch.h"