diff --git a/msi.c b/msi.c index 9fc6097..0247f88 100644 --- a/msi.c +++ b/msi.c @@ -319,7 +319,7 @@ static MSI_ENTRY *parse_entry(MSI_FILE *msi, const u_char *data, int is_root) memcpy(entry->name, data + DIRENT_NAME, entry->nameLen); /* The root directory entry's Name field MUST contain the null-terminated * string "Root Entry" in Unicode UTF-16. */ - if (is_root && memcmp(entry->name, root_entry, entry->nameLen)) { + if (is_root && memcmp(entry->name, msi_root_entry, entry->nameLen)) { printf("Corrupted Root Directory Entry's Name\n"); OPENSSL_free(entry); return NULL; /* FAILED */ @@ -334,7 +334,7 @@ static MSI_ENTRY *parse_entry(MSI_FILE *msi, const u_char *data, int is_root) memcpy(entry->creationTime, data + DIRENT_CREATE_TIME, 8); /* The Creation Time field in the root storage directory entry MUST be all zeroes but the Modified Time field in the root storage directory entry MAY be all zeroes */ - if (is_root && memcmp(entry->creationTime, zeroes, 8)) { + if (is_root && memcmp(entry->creationTime, msi_zeroes, 8)) { printf("Corrupted Root Directory Entry's Creation Time\n"); OPENSSL_free(entry); return NULL; /* FAILED */ diff --git a/msi.h b/msi.h index b3f26bb..6d692a7 100644 --- a/msi.h +++ b/msi.h @@ -200,13 +200,13 @@ static const u_char digital_signature_ex[] = { 0x45, 0x00, 0x78, 0x00, 0x00, 0x00 }; -static const u_char root_entry[] = { +static const u_char msi_root_entry[] = { 0x52, 0x00, 0x6F, 0x00, 0x6F, 0x00, 0x74, 0x00, 0x20, 0x00, 0x45, 0x00, 0x6E, 0x00, 0x74, 0x00, 0x72, 0x00, 0x79, 0x00, 0x00, 0x00 }; -static const u_char zeroes[] = { +static const u_char msi_zeroes[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };