1
0
Fork 0
mirror of git://slackware.nl/current.git synced 2025-02-01 19:57:45 +01:00
slackware-current/source/a/shadow/patches/r3096.diff

28 lines
623 B
Diff
Raw Normal View History

* lib/gshadow.c: Fix parsing of gshadow entries.
Index: lib/gshadow.c
===================================================================
--- lib/gshadow.c (revision 3095)
+++ lib/gshadow.c (revision 3096)
@@ -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, (int) buflen, fp) == buf)
#else
- if (fgetsx (buf, (int) sizeof buf, fp) == buf)
+ if (fgetsx (buf, (int) buflen, fp) == buf)
#endif
{
while ( ((cp = strrchr (buf, '\n')) == NULL)