Chameleon

Chameleon Commit Details

Date:2011-05-25 15:17:23 (12 years 10 months ago)
Author:Kabyl
Commit:876
Parents: 875
Message:Really fix issue #75 (duplicate of #73), previous commit r863
Changes:
M/trunk/i386/libsaio/smbios.c

File differences

trunk/i386/libsaio/smbios.c
405405
406406
407407
408
408
409409
410410
411411
......
428428
429429
430430
431
431
432432
433433
434434
......
604604
605605
606606
607
607
608608
609
610
611609
612610
613611
uint8_t *stringPtr = (uint8_t *)structHeader + structHeader->length;
if (!field)
return (char *)0;
return NULL;
for (field--; field != 0 && strlen((char *)stringPtr) > 0;
field--, stringPtr = (uint8_t *)((uint32_t)stringPtr + strlen((char *)stringPtr) + 1));
strSize = strlen(string);
// remove any spaces found at the end
while ((string[strSize - 1] == ' ') && strSize != 0)
while ((strSize != 0) && (string[strSize - 1] == ' '))
strSize--;
if (strSize == 0)
memcpy((void *)structPtr->new, structPtr->orig, structPtr->orig->length);
for (i = 0; i < numOfSetters; i++)
if (structPtr->orig->type == SMBSetters[i].type)
if ((structPtr->orig->type == SMBSetters[i].type) && (SMBSetters[i].fieldOffset < structPtr->orig->length))
{
if (SMBSetters[i].fieldOffset > structPtr->orig->length)
continue;
setterFound = true;
setSMBValue(structPtr, i, (returnType *)((uint8_t *)structPtr->new + SMBSetters[i].fieldOffset));
}

Archive Download the corresponding diff file

Revision: 876