Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178395596
D2560.1796658835.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D2560.1796658835.diff
View Options
Index: head/sys/kern/kern_shutdown.c
===================================================================
--- head/sys/kern/kern_shutdown.c
+++ head/sys/kern/kern_shutdown.c
@@ -873,16 +873,16 @@
{
bzero(kdh, sizeof(*kdh));
- strncpy(kdh->magic, magic, sizeof(kdh->magic));
- strncpy(kdh->architecture, MACHINE_ARCH, sizeof(kdh->architecture));
+ strlcpy(kdh->magic, magic, sizeof(kdh->magic));
+ strlcpy(kdh->architecture, MACHINE_ARCH, sizeof(kdh->architecture));
kdh->version = htod32(KERNELDUMPVERSION);
kdh->architectureversion = htod32(archver);
kdh->dumplength = htod64(dumplen);
kdh->dumptime = htod64(time_second);
kdh->blocksize = htod32(blksz);
- strncpy(kdh->hostname, prison0.pr_hostname, sizeof(kdh->hostname));
- strncpy(kdh->versionstring, version, sizeof(kdh->versionstring));
+ strlcpy(kdh->hostname, prison0.pr_hostname, sizeof(kdh->hostname));
+ strlcpy(kdh->versionstring, version, sizeof(kdh->versionstring));
if (panicstr != NULL)
- strncpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring));
+ strlcpy(kdh->panicstring, panicstr, sizeof(kdh->panicstring));
kdh->parity = kerneldump_parity(kdh);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 7, 3:53 PM (20 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42285975
Default Alt Text
D2560.1796658835.diff (1 KB)
Attached To
Mode
D2560: Properly null-terminate strings in a kernel dump header
Attached
Detach File
Event Timeline