libio/test-fmemopen.c
For b/22167761, backport fix buffer overflow for writes to memory buffer stream (PR18549)
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7c2ce714d4e853aadbec13b920576fdfada520f1
+ (stanshebs, backport)
string/string.h
math/bits/mathcalls.h
upstream commit
https://sourceware.org/git/?p=glibc.git&a=commit&h=f8aeae347377f3dfa8cbadde057adf1827fb1d44
fixes this problem in a different way, so this patch is not needed upstream.
+ (stanshebs, google-local)
elf/link.h
socket/sys/un.h
resolv/nss_dns/dns-host.c
For b/21023324, backport buffer overflow in getanswer_r (PR18287, CVE-2015-1781)
https://sourceware.org/git/?p=glibc.git;a=commit;h=2959eda9272a03386
+ (stanshebs, backport)
+
+nss/nss_borg/borg-pwd.c
+ Improve documentation, remove dead code.
+ (stanshebs, google-local)
// Author: Paul Menage
// An NSS module that extends local user account lookup to the file /etc/passwd.borg
+// (Despite the suggestive name, passwd.borg is just a second file in the standard
+// passwd format, separated for various reasons. -sts 2015)
#include <stdio.h>
#include <pwd.h>
#include <errno.h>
#include <string.h>
-#ifdef NSSBORG_STANDALONE
-#include <pthread.h>
-static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
-#define NSSBORG_LOCK pthread_mutex_lock(&mutex)
-#define NSSBORG_UNLOCK pthread_mutex_unlock(&mutex)
-#else
#include <bits/libc-lock.h>
__libc_lock_define_initialized (static, lock)
#define NSSBORG_LOCK __libc_lock_lock (lock)
#define NSSBORG_UNLOCK __libc_lock_unlock (lock);
-#endif
static FILE *f;