diff options
author | 2010-07-10 00:47:18 +0000 | |
---|---|---|
committer | 2010-07-10 00:47:18 +0000 | |
commit | 042aa2c9b48dc7e86b6991b9e94d4d0192c4aa6f (patch) | |
tree | b0640f26e6b66eb052e5e9d3fc3fa31755c192e7 /sys-apps/shadow/files | |
parent | Version bump. (diff) | |
download | historical-042aa2c9b48dc7e86b6991b9e94d4d0192c4aa6f.tar.gz historical-042aa2c9b48dc7e86b6991b9e94d4d0192c4aa6f.tar.bz2 historical-042aa2c9b48dc7e86b6991b9e94d4d0192c4aa6f.zip |
Fix /etc/gshadow reading #327605 by Dirk Sondermann.
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'sys-apps/shadow/files')
-rw-r--r-- | sys-apps/shadow/files/shadow-4.1.4.2-fix-etc-gshadow-reading.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sys-apps/shadow/files/shadow-4.1.4.2-fix-etc-gshadow-reading.patch b/sys-apps/shadow/files/shadow-4.1.4.2-fix-etc-gshadow-reading.patch new file mode 100644 index 000000000000..f8025a0530f3 --- /dev/null +++ b/sys-apps/shadow/files/shadow-4.1.4.2-fix-etc-gshadow-reading.patch @@ -0,0 +1,27 @@ +http://bugs.debian.org/569899 +http://bugs.gentoo.org/327605 + +buf is not an array, it's a static pointer, so we have to use buflen + +--- lib/gshadow.c ++++ lib/gshadow.c +@@ -222,6 +222,7 @@ + if (NULL == buf) { + return NULL; + } ++ buflen = BUFSIZ; + } + + if (NULL == fp) { +@@ -229,9 +230,9 @@ + } + + #ifdef USE_NIS +- while (fgetsx (buf, (int) sizeof buf, fp) == buf) ++ while (fgetsx (buf, buflen, fp) == buf) + #else +- if (fgetsx (buf, (int) sizeof buf, fp) == buf) ++ if (fgetsx (buf, buflen, fp) == buf) + #endif + { + while ( ((cp = strrchr (buf, '\n')) == NULL) |