mtrojnar / osslsigncode

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

Fix construction of signed CAB header #290

Closed mcb30 closed 1 year ago

mcb30 commented 1 year ago

Commit 0f51a06 ("Separate common and format-dependent functions") performed a substantial amount of refactoring. Within the CFFOLDER header construction loop in cab_add_header(), the line

tmp = GET_UINT32_LE(indata + i);

seems to have been accidentally deleted, instead of being refactored to become

tmp = GET_UINT32_LE(ctx->options->indata + i);

with the result that adding a signature to a .cab file will currently produce an invalid .cab file.

Fix by adding back in the missing line of code.

Fixes: #289

mtrojnar commented 1 year ago

@olszomal Can you please review this PR?

olszomal commented 1 year ago

Looks good to me. Thank you very much for your patch.