Chameleon

Chameleon Commit Details

Date:2015-03-11 15:27:18 (9 years 1 month ago)
Author:ErmaC
Commit:2613
Parents: 2612
Message:strlcpy instead of strcpy (disk.c)
Changes:
M/trunk/i386/libsaio/disk.c

File differences

trunk/i386/libsaio/disk.c
18371837
18381838
18391839
1840
1840
18411841
18421842
18431843
......
18601860
18611861
18621862
1863
1863
18641864
18651865
18661866
if (bvr->flags & kBVFlagBooter)
{
snprintf(dirSpec, sizeof(dirSpec), "hd(%d,%d)/System/Library/CoreServices/", BIOS_DEV_UNIT(bvr), bvr->part_no);
strcpy(fileSpec, ".disk_label.contentDetails");
strlcpy(fileSpec, ".disk_label.contentDetails", sizeof(fileSpec));
ret = GetFileInfo(dirSpec, fileSpec, &flags, &time);
if (!ret)
{
if (!error)
{
label[fileSize] = '\0';
strcpy(bvr->altlabel, label);
strlcpy(bvr->altlabel, label, sizeof(bvr->altlabel));
}
}
}

Archive Download the corresponding diff file

Revision: 2613