Computing the end of section 9 points to 19136 but the reported start of section 10 is at 19456. Checking the contents of the file it's visible there is still padding after the computed end of section 9:
And the reported start of section 10 shows at the end of the padding and at the proper alignment:
By adjusting the reported size of the section to be properly aligned, the file can be fully read/digested and signed:
And properly validated that the signature is correct:
I've also included the executable so it can be inspected if needed. If a different approach is preferred or whatever, please just let me know. Thanks so much!
When attempting to sign a PE file I encountered the following error:
Inspecting the sections of the PE file, I found that the listed size of one of the sections was not properly aligned:
Computing the end of section 9 points to
19136
but the reported start of section 10 is at19456
. Checking the contents of the file it's visible there is still padding after the computed end of section 9:And the reported start of section 10 shows at the end of the padding and at the proper alignment:
By adjusting the reported size of the section to be properly aligned, the file can be fully read/digested and signed:
And properly validated that the signature is correct:
I've also included the executable so it can be inspected if needed. If a different approach is preferred or whatever, please just let me know. Thanks so much!
ruby.zip