[BZ #13592]
There are several signed compares of the size argument, whereas
it really is unsigned. Depending on situations e.g. a "memset(ptr, 0,
-1)" segfault (but for the wrong reasons, because jumping into nirvana)
or succeeds even.
In normal use this is harmless, as a size with signbit set indicates
more than half the address space which on x86_64 is impossible to
allocate, but as the size is used to index some jump tables this
potentially could have other unwanted side effects.
[BZ #13908]
mktemp always returns TEMPLATE, the caller should check TEMPLATE[0]
instead of TEMPLATE, so do not warn about the unused result.
Fix also the comment for mktemp
[BZ#13926]
Currently __bswap_64 is not defined at all for non-GCC compilers.
Define it but guard it with __GLIBC_HAVE_LONG_LONG.
endian.h uses __bswap_64, make the functions only available
if __GLIBC_HAVE_LONG_LONG is defined.
[BZ #13928] A DNS request consists of multiple resources combined into
a single hostent, including multiple CNAME records that may have been
assigned different TTL values. In such a case, nscd should take the
least TTL among all of the resources as the timeout for the hostent
before it is reloaded in its cache so that the hostent remains stale
in the database for the least amount of time.
It isn't necessary to buffer the last character of strings. This can cause a
bug with strings that have 1 character between 0x0041 and 0x01b0.
[BZ #13691]
* iconvdata/tcvn5712-1.c (FROM_LOOP): Fix a bug when converting strings
with only 1 character between 0x0041 and 0x01b0.
* wcsmbs/Makefile (tests): Add tst-mbsnrtowcs.
* wcsmbs/tst-mbsnrtowcs.c: New file.
[BZ #6471]
* sysdeps/unix/sysv/linux/shmat.c (shmat): Test for syscall errors
properly.
* sysdeps/unix/sysv/linux/sparc/getshmlba.c: New file.
* sysdeps/unix/sysv/linux/sparc/Makefile: Add getshmlba to
sysdep_routines when subdir is sysvipc.
* sysdeps/unix/sysv/linux/sparc/bits/shm.h (SHMLBA): Use new
__getshmlba helper.