summaryrefslogtreecommitdiff
path: root/source/a/shadow/patches/r3096.diff
blob: 0e77ce6fe35d24740d76c35534e44b10071cd21b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

* 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)