Make signature verification fail closed
check_signature carried STATUS_SUCCESS out of calculate_sha256 into the trusted-key loop and never reset it, so a loop that never ran returned success and every module would load unverified. Safe today with one key present, but a fork, a rebrand or a key rotation that empties the array would silently disable module authentication -- and without any of the logging PAWNIO_UNRESTRICTED prints. Seed it with STATUS_INVALID_SIGNATURE. calculate_sha256 had the same shape: if BCryptGetProperty reported an unexpected property length the entire hash block was skipped and its STATUS_SUCCESS returned over an uninitialized stack buffer.
N
namazso committed
17d045a7453c485d5aba16d49879b1cf15534339
Parent: b0c8134