Chameleon

Chameleon Commit Details

Date:2014-01-12 08:23:37 (5 years 5 months ago)
Author:Chuck Fry
Commit:2339
Parents: 2338
Message:Defend against buffer overruns in FlattenNodes
Changes:
M/branches/chucko/i386/libsaio/device_tree.c

File differences

branches/chucko/i386/libsaio/device_tree.c
297297
298298
299299
300
300
301301
302302
303303
for (count = 0, prop = node->properties; prop != 0; count++, prop = prop->next)
{
flatProp = (DeviceTreeNodeProperty *)buffer;
strcpy(flatProp->name, prop->name);
strncpy(flatProp->name, prop->name, kPropNameLength);
flatProp->length = prop->length;
buffer += sizeof(DeviceTreeNodeProperty);
bcopy(prop->value, buffer, prop->length);

Archive Download the corresponding diff file

Revision: 2339