Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F139382226
D45004.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
687 B
Referenced Files
None
Subscribers
None
D45004.diff
View Options
diff --git a/lib/libulog/ulog_login.c b/lib/libulog/ulog_login.c
--- a/lib/libulog/ulog_login.c
+++ b/lib/libulog/ulog_login.c
@@ -49,7 +49,7 @@
utx->ut_pid = getpid();
gettimeofday(&utx->ut_tv, NULL);
- strncpy(utx->ut_line, line, sizeof utx->ut_line);
+ strlcpy(utx->ut_line, line, sizeof utx->ut_line);
SHA1_Init(&c);
SHA1_Update(&c, "libulog", 7);
@@ -66,9 +66,9 @@
ulog_fill(&utx, line);
utx.ut_type = USER_PROCESS;
- strncpy(utx.ut_user, user, sizeof utx.ut_user);
+ strlcpy(utx.ut_user, user, sizeof utx.ut_user);
if (host != NULL)
- strncpy(utx.ut_host, host, sizeof utx.ut_host);
+ strlcpy(utx.ut_host, host, sizeof utx.ut_host);
pututxline(&utx);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 12, 12:34 PM (54 m, 11 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26896140
Default Alt Text
D45004.diff (687 B)
Attached To
Mode
D45004: libulog: Make sure ut_line, ut_user, ut_host are terminated.
Attached
Detach File
Event Timeline
Log In to Comment