mtrojnar / osslsigncode

OpenSSL based Authenticode signing for PE/MSI/Java CAB files
Other
806 stars 131 forks source link

Fix out-of-bounds read, CID 1519383 #206

Closed olszomal closed 1 year ago

mtrojnar commented 1 year ago

Wouldn't

if (is_root && (entry->nameLen > sizeof msi_root_entry || memcmp(entry->name, msi_root_entry, entry->nameLen))) {

be both more strict and easier to understand?

olszomal commented 1 year ago

if (is_root && (entry->nameLen != sizeof msi_root_entry || memcmp(entry->name, msi_root_entry, entry->nameLen))) {