forked from pool/glibc
Andreas Schwab
10a15f0fa7
- nss-files-long-lines.patch: Don't ignore too long lines in nss_files (bnc#883217, BZ #17079) - Remove locale.1, localedef.1 and iconvconfig.8 manpages, now included in the man-pages package (bnc#880703) - manpages.patch: update OBS-URL: https://build.opensuse.org/request/show/238380 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=370
25 lines
843 B
Diff
25 lines
843 B
Diff
2014-06-23 Andreas Schwab <schwab@suse.de>
|
|
|
|
[BZ #17079]
|
|
* nss/nss_files/files-XXX.c (get_contents): Store overflow marker
|
|
before reading the next line.
|
|
|
|
Index: glibc-2.19/nss/nss_files/files-XXX.c
|
|
===================================================================
|
|
--- glibc-2.19.orig/nss/nss_files/files-XXX.c
|
|
+++ glibc-2.19/nss/nss_files/files-XXX.c
|
|
@@ -198,10 +198,12 @@ get_contents (char *linebuf, size_t len,
|
|
{
|
|
int curlen = ((remaining_len > (size_t) INT_MAX) ? INT_MAX
|
|
: remaining_len);
|
|
- char *p = fgets_unlocked (curbuf, curlen, stream);
|
|
|
|
+ /* Terminate the line so that we can test for overflow. */
|
|
((unsigned char *) curbuf)[curlen - 1] = 0xff;
|
|
|
|
+ char *p = fgets_unlocked (curbuf, curlen, stream);
|
|
+
|
|
/* EOF or read error. */
|
|
if (p == NULL)
|
|
return gcr_error;
|