mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-12 11:01:52 +00:00
Fixes authenticode signing if a section name starts with an underscore.
This commit is contained in:
parent
9f57c27dd1
commit
1855dd1d56
1 changed files with 1 additions and 1 deletions
|
@ -298,7 +298,7 @@ function createAuthenticodeHandler(path) {
|
||||||
for (var i = 0; i < obj.header.coff.numberOfSections; i++) {
|
for (var i = 0; i < obj.header.coff.numberOfSections; i++) {
|
||||||
var section = {};
|
var section = {};
|
||||||
buf = readFileSlice(obj.header.SectionHeadersPtr + (i * 40), 40);
|
buf = readFileSlice(obj.header.SectionHeadersPtr + (i * 40), 40);
|
||||||
if (buf[0] != 46) { obj.close(); return false; }; // Name of the section must start with a dot. If not, something is wrong.
|
if ((buf[0] != 46) && (buf[0] != 95)) { obj.close(); return false; }; // Name of the section must start with a dot or underscore. If not, something is wrong.
|
||||||
var sectionName = buf.slice(0, 8).toString().trim('\0');
|
var sectionName = buf.slice(0, 8).toString().trim('\0');
|
||||||
var j = sectionName.indexOf('\0');
|
var j = sectionName.indexOf('\0');
|
||||||
if (j >= 0) { sectionName = sectionName.substring(0, j); } // Trim any trailing zeroes
|
if (j >= 0) { sectionName = sectionName.substring(0, j); } // Trim any trailing zeroes
|
||||||
|
|
Loading…
Reference in a new issue