Page MenuHomeFreeBSD

D23159.diff
No OneTemporary

D23159.diff

Index: head/usr.sbin/fstyp/hammer.c
===================================================================
--- head/usr.sbin/fstyp/hammer.c
+++ head/usr.sbin/fstyp/hammer.c
@@ -76,7 +76,7 @@
assert(count != 0);
memcpy(&fsid, &ondisk->vol_fsid, sizeof(fsid));
memcpy(&fstype, &ondisk->vol_fstype, sizeof(fstype));
- strncpy(label, ondisk->vol_label, sizeof(label));
+ strlcpy(label, ondisk->vol_label, sizeof(label));
} else {
if (ondisk->vol_count != count)
return (5);
@@ -84,7 +84,7 @@
return (6);
if (memcmp(&ondisk->vol_fstype, &fstype, sizeof(fstype)))
return (7);
- if (strncmp(ondisk->vol_label, label, sizeof(label)))
+ if (strcmp(ondisk->vol_label, label))
return (8);
}

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 22, 9:44 PM (17 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16039499
Default Alt Text
D23159.diff (718 B)

Event Timeline