Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F112069729
D10690.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
677 B
Referenced Files
None
Subscribers
None
D10690.diff
View Options
Index: head/lib/libc/gen/getusershell.c
===================================================================
--- head/lib/libc/gen/getusershell.c
+++ head/lib/libc/gen/getusershell.c
@@ -115,8 +115,8 @@
if ((fp = fopen(_PATH_SHELLS, "re")) == NULL)
return NS_UNAVAIL;
- cp = line;
- while (fgets(cp, MAXPATHLEN + 1, fp) != NULL) {
+ while (fgets(line, MAXPATHLEN + 1, fp) != NULL) {
+ cp = line;
while (*cp != '#' && *cp != '/' && *cp != '\0')
cp++;
if (*cp == '#' || *cp == '\0')
@@ -124,7 +124,7 @@
sp = cp;
while (!isspace(*cp) && *cp != '#' && *cp != '\0')
cp++;
- *cp++ = '\0';
+ *cp = '\0';
sl_add(sl, strdup(sp));
}
(void)fclose(fp);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 13, 9:36 AM (17 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17133456
Default Alt Text
D10690.diff (677 B)
Attached To
Mode
D10690: getusershell(3): Don't write past the end of line buffer reading local shells
Attached
Detach File
Event Timeline
Log In to Comment