Fix memory leak in regexp compiler (BZ #17069)

(cherry picked from commit 4d43ef1e7434d7d419afbcd754931cb0c794763c)

Conflicts:
	posix/Makefile
Fix another memory leak in regexp compiler (BZ #17069)

(cherry picked from commit aa6ec754f3b4b1df81d186480c534b6486a1e6ee)

Conflicts:
	NEWS
[BZ #16046] dl_iterate_phdr static executable test

(cherry picked from commit 257ce7127e2f64a6a959b146786cd43de0e42b5f)
Provide correct buffer length to netgroup queries in nscd (BZ #16695)

The buffer to query netgroup entries is allocated sufficient space for
the netgroup entries and the key to be appended at the end, but it
sends in an incorrect available length to the NSS netgroup query
functions, resulting in overflow of the buffer in some special cases.
The fix here is to factor in the key length when sending the available
buffer and buffer length to the query functions.

(cherry picked from commit c44496df2f090a56d3bf75df930592dac6bba46f)

Conflicts:
	NEWS
Use NSS_STATUS_TRYAGAIN to indicate insufficient buffer (BZ #16878)

The netgroups nss modules in the glibc tree use NSS_STATUS_UNAVAIL
(with errno as ERANGE) when the supplied buffer does not have
sufficient space for the result.  This is wrong, because the canonical
way to indicate insufficient buffer is to set the errno to ERANGE and
the status to NSS_STATUS_TRYAGAIN, as is used by all other modules.

This fixes nscd behaviour when the nss_ldap module returns
NSS_STATUS_TRYAGAIN to indicate that a netgroup entry is too long to
fit into the supplied buffer.

(cherry picked from commit c3ec475c5dd16499aa040908e11d382c3ded9692)

Conflicts:
	NEWS
setlocale: Use the heap for the copy of the locale argument

This avoids alloca calls with potentially large arguments.

(cherry picked from commit d183645616b0533b3acee28f1a95570bffbdf50f)
_nl_find_locale: Improve handling of crafted locale names [BZ #17137]

Prevent directory traversal in locale-related environment variables
(CVE-2014-0475).

(cherry picked from commit 4e8f95a0df7c2300b830ec12c0ae1e161bc8a8a3)

Conflicts:
	NEWS
	localedata/Makefile
manual: Update the locale documentation

(cherry picked from commit 585367266923156ac6fb789939a923641ba5aaf4)

Conflicts:
	manual/locale.texi
S/390: Revert the jmp_buf/ucontext_t ABI change

Backport of commit 2f438e20ab591641760e97458d5d1569942eced5
NEWS: Explain the s390 jmp_buf / ucontext_t ABI change reversal.

(cherry picked from commit 95ee7fb13ba99ba265b49531c57e1cb8db629bc6)

Typo fix as in commit 45ef66289acbab17278a73512f9b2a9d8a7ca79d and
NEW enty adjusted to reflect revert occuring in 2.19.1 and 2.20.

Conflicts:
	NEWS
__gconv_translit_find: Disable function [BZ #17187]

This functionality has never worked correctly, and the implementation
contained a security vulnerability (CVE-2014-5119).

(cherry picked from commit a1a6a401ab0a3c9f15fb7eaebbdcee24192254e8)
(cherry picked from commit f9df71e895d3552d557e783fdb9d133328195645)

Conflicts:
	NEWS