Chameleon

Chameleon Commit Details

Date:2015-03-15 22:34:22 (9 years 1 month ago)
Author:ErmaC
Commit:2637
Parents: 2636
Message:Add size as arg to getPlatformName using strlcpy
Changes:
M/trunk/i386/libsaio/bootstruct.c
M/trunk/i386/libsaio/misc.c
M/trunk/i386/libsaio/saio_internal.h

File differences

trunk/i386/libsaio/bootstruct.c
9898
9999
100100
101
101
102102
103103
104104
stop("Couldn't create root node");
}
getPlatformName(platformName);
getPlatformName(platformName, sizeof(platformName));
nameLen = strlen(platformName) + 1;
DT__AddProperty(node, "compatible", nameLen, platformName);
DT__AddProperty(node, "model", nameLen, platformName);
trunk/i386/libsaio/misc.c
115115
116116
117117
118
118
119119
120
120
121121
122122
//
#ifndef BOOT1
void
getPlatformName(char *nameBuf)
getPlatformName(char *nameBuf, int size)
{
strcpy(nameBuf, "ACPI");
strlcpy(nameBuf, "ACPI", size);
}
#endif
trunk/i386/libsaio/saio_internal.h
140140
141141
142142
143
143
144144
145145
146146
/* misc.c */
extern int checkForSupportedHardware();
extern int isLaptop();
extern void getPlatformName(char *nameBuf);
extern void getPlatformName(char *nameBuf, int size);
/* nbp.c */
extern UInt32 nbpUnloadBaseCode();

Archive Download the corresponding diff file

Revision: 2637