Chameleon

Chameleon Commit Details

Date:2011-01-30 03:01:55 (13 years 2 months ago)
Author:Evan Lojewski
Commit:718
Parents: 717
Message:Convert strlen to sizeof for constant sizes
Changes:
M/branches/meklort/i386/modules/KextPatcher/kext_patcher.c

File differences

branches/meklort/i386/modules/KextPatcher/kext_patcher.c
447447
448448
449449
450
450
451451
452452
453453
......
592592
593593
594594
595
595
596596
597597
598598
......
670670
671671
672672
673
673
674674
675675
676676
TagPtr match_class =XMLCastArray(XMLGetProperty(personality, (const char*)"IOPCIClassMatch"));
char* new_str = malloc(strlen("0xXXXX000&0xFFFE0000")+1);
char* new_str = malloc(sizeof("0xXXXX000&0xFFFE0000"));
sprintf(new_str, "0x04030000&0xFFFE0000"); // todo, pass in actual class id
TagPtr match_names =XMLCastArray(XMLGetProperty(personality, (const char*)"IONameMatch"));
char* new_str = malloc(strlen("pci14e4,xxxx")+1);
char* new_str = malloc(sizeof("pci14e4,xxxx"));
sprintf(new_str, "pci14e4,%02x", patch_bcm_deviceid);
// Check to see if we *really* need to modify the plist, if not, return false
DBG("Inflated result is %d, in: %d bytes, out: %d bytes, full: %d\n", zlib_result, zstream.total_in, zstream.total_out, full_size);
char* newstring = malloc(strlen("0x00008086") + 1);
char* newstring = malloc(sizeof("0x00008086"));
sprintf(newstring, "0x%04x", 0x8086 | (patch_gma_deviceid << 16));

Archive Download the corresponding diff file

Revision: 718