From 3eb41074b495baa574128941461689254f796ede Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:12:37 +0000 Subject: [PATCH 01/10] fix(adhoc-sweep-fixes): 15 review findings across 10 files --- modules/amt_heci.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/amt_heci.js b/modules/amt_heci.js index 7f51b0c64..24d1088cd 100644 --- a/modules/amt_heci.js +++ b/modules/amt_heci.js @@ -262,32 +262,32 @@ function amt_heci() { fn.apply(this, opt); }, callback, optional); } - this.startConfiguration = function () { + this.startConfiguration = function (data, callback) { var optional = []; for (var i = 2; i < arguments.length; ++i) { optional.push(arguments[i]); } this.sendCommand(0x29, data, function (header, fn, opt) { opt.unshift(header.Status); fn.apply(this, opt); }, callback, optional); } - this.stopConfiguration = function () { + this.stopConfiguration = function (data, callback) { var optional = []; for (var i = 2; i < arguments.length; ++i) { optional.push(arguments[i]); } this.sendCommand(0x5E, data, function (header, fn, opt) { opt.unshift(header.Status); fn.apply(this, opt); }, callback, optional); } - this.openUserInitiatedConnection = function () { + this.openUserInitiatedConnection = function (data, callback) { var optional = []; for (var i = 2; i < arguments.length; ++i) { optional.push(arguments[i]); } this.sendCommand(0x44, data, function (header, fn, opt) { opt.unshift(header.Status); fn.apply(this, opt); }, callback, optional); } - this.closeUserInitiatedConnection = function () { + this.closeUserInitiatedConnection = function (data, callback) { var optional = []; for (var i = 2; i < arguments.length; ++i) { optional.push(arguments[i]); } this.sendCommand(0x45, data, function (header, fn, opt) { opt.unshift(header.Status); fn.apply(this, opt); }, callback, optional); } - this.getRemoteAccessConnectionStatus = function () { + this.getRemoteAccessConnectionStatus = function (data, callback) { var optional = []; for (var i = 2; i < arguments.length; ++i) { optional.push(arguments[i]); } this.sendCommand(0x46, data, function (header, fn, opt) { if (header.Status == 0) { - var hostname = v.slice(14, header.Data.readUInt16LE(12) + 14).toString() + var hostname = header.Data.slice(14, header.Data.readUInt16LE(12) + 14).toString() opt.unshift({ status: header.Status, networkStatus: header.Data.readUInt32LE(0), remoteAccessStatus: header.Data.readUInt32LE(4), remoteAccessTrigger: header.Data.readUInt32LE(8), mpsHostname: hostname, raw: header.Data }); } else { opt.unshift({ status: header.Status }); @@ -297,7 +297,7 @@ function amt_heci() { } this.getProtocolVersion = function (callback) { var optional = []; - for (var i = 1; i < arguments.length; ++i) { opt.push(arguments[i]); } + for (var i = 1; i < arguments.length; ++i) { optional.push(arguments[i]); } heci.doIoctl(heci.IOCTL.HECI_VERSION, Buffer.alloc(5), Buffer.alloc(5), function (status, buffer, self, fn, opt) { if (status == 0) { @@ -313,4 +313,4 @@ function amt_heci() { } } -module.exports = amt_heci; \ No newline at end of file +module.exports = amt_heci; From 9094d22512ea1d5f9fb9fb99a217528c5f3bcbb0 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:12:38 +0000 Subject: [PATCH 02/10] fix(adhoc-sweep-fixes): 15 review findings across 10 files --- meshcore/KVM/MacOS/mac_tile.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meshcore/KVM/MacOS/mac_tile.h b/meshcore/KVM/MacOS/mac_tile.h index 9541c9763..a60225bdc 100644 --- a/meshcore/KVM/MacOS/mac_tile.h +++ b/meshcore/KVM/MacOS/mac_tile.h @@ -7,8 +7,8 @@ * */ -#ifndef LINUX_TILE_H_ -#define LINUX_TILE_H_ +#ifndef MAC_TILE_H_ +#define MAC_TILE_H_ #include #include @@ -37,5 +37,6 @@ extern int getScreenBuffer(unsigned char **desktop, long long *desktopsize, CGIm extern void set_tile_compression(int type, int level); -#endif /* LINUX_TILE_H_ */ +#endif /* MAC_TILE_H_ */ + From 4d480ca31bbedb9b9ee4b41f7ed4ac5fde57f624 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:12:39 +0000 Subject: [PATCH 03/10] fix(adhoc-sweep-fixes): 15 review findings across 10 files --- microstack/ILibMulticastSocket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/microstack/ILibMulticastSocket.c b/microstack/ILibMulticastSocket.c index 21b5ad65b..90641df57 100644 --- a/microstack/ILibMulticastSocket.c +++ b/microstack/ILibMulticastSocket.c @@ -214,7 +214,7 @@ void ILibMulticastSocket_BroadcastUdpPacketV4(struct ILibMulticastSocket_StateMo #ifndef NACL if (module->UDPServers[i] != NULL) { - socket = ILibAsyncUDPSocket_GetSocket(module->UDPServer); + socket = ILibAsyncUDPSocket_GetSocket(module->UDPServers[i]); setsockopt(socket, IPPROTO_IP, IP_MULTICAST_IF, (const char*)&(module->AddressListV4[i].sin_addr), sizeof(struct in_addr)); setsockopt(socket, IPPROTO_IP, IP_MULTICAST_TTL, (const char*)&(module->TTL), sizeof(int)); for (j = 0; j < count; j++) sendto(socket, data, datalen, 0, (struct sockaddr*)addr, sizeof(struct sockaddr_in)); @@ -397,3 +397,4 @@ void ILibMulticastSocket_WakeOnLan(void *module, char* mac) ILibMulticastSocket_Broadcast((struct ILibMulticastSocket_StateModule*)module, ILibScratchPad, 102, 1); } } + From 4f074390a9dce2016f6cd574176b1faafb90f0b2 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:12:40 +0000 Subject: [PATCH 04/10] fix(adhoc-sweep-fixes): 15 review findings across 10 files --- modules/lme_heci.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/lme_heci.js b/modules/lme_heci.js index 47343cab7..e5f0a76c4 100644 --- a/modules/lme_heci.js +++ b/modules/lme_heci.js @@ -141,7 +141,7 @@ function lme_heci() break; case APF_SERVICE_REQUEST: var nameLen = chunk.readUInt32BE(1); - var name = chunk.slice(5, nameLen + 5); + var name = chunk.slice(5, nameLen + 5).toString(); //console.log("Service Request for: " + name); if (name == 'pfwd@amt.intel.com' || name == 'auth@amt.intel.com') { @@ -353,3 +353,4 @@ function lme_heci() } module.exports = lme_heci; + From 9e17da576105e6c7355ec895bc68d67a2943517f Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:12:41 +0000 Subject: [PATCH 05/10] fix(adhoc-sweep-fixes): 15 review findings across 10 files --- modules/amt-xml.js | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/modules/amt-xml.js b/modules/amt-xml.js index cf82c02c9..5e59cea14 100644 --- a/modules/amt-xml.js +++ b/modules/amt-xml.js @@ -70,42 +70,6 @@ function _ParseWsmanRec(node) { return r; } -function _PutObjToBodyXml(resuri, putObj) { - if (!resuri || putObj == null) return ''; - var objname = obj.GetNameFromUrl(resuri); - var result = ''; - - for (var prop in putObj) { - if (!putObj.hasOwnProperty(prop) || prop.indexOf('__') === 0 || prop.indexOf('@') === 0) continue; - if (putObj[prop] == null || typeof putObj[prop] === 'function') continue; - if (typeof putObj[prop] === 'object' && putObj[prop]['ReferenceParameters']) { - result += '' + putObj[prop].Address + '' + putObj[prop]['ReferenceParameters']["ResourceURI"] + ''; - var selectorArray = putObj[prop]['ReferenceParameters']['SelectorSet']['Selector']; - if (Array.isArray(selectorArray)) { - for (var i = 0; i < selectorArray.length; i++) { - result += '' + selectorArray[i]['Value'] + ''; - } - } - else { - result += '' + selectorArray['Value'] + ''; - } - result += ''; - } - else { - if (Array.isArray(putObj[prop])) { - for (var i = 0; i < putObj[prop].length; i++) { - result += '' + putObj[prop][i].toString() + ''; - } - } else { - result += '' + putObj[prop].toString() + ''; - } - } - } - - result += ''; - return result; -} - // This is a drop-in replacement to _turnToXml() that works without xml parser dependency. function _treeBuilder() { this.tree = []; @@ -187,3 +151,4 @@ function _turnToXmlRec(text) { } catch (ex) { return null; } return lastElement; } + From 59e9821c5d5ecdde3c827568b3189c4d10c98b78 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:12:42 +0000 Subject: [PATCH 06/10] fix(adhoc-sweep-fixes): 15 review findings across 10 files --- modules/win-wmi.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/win-wmi.js b/modules/win-wmi.js index 02bc675d4..75d4f18af 100644 --- a/modules/win-wmi.js +++ b/modules/win-wmi.js @@ -254,6 +254,8 @@ function enumerateProperties(j, fields) { properties.push(nn.Deref().increment(i * GM.PointerSize).Deref().Wide2UTF8); } + + OleAut32.SafeArrayUnaccessData(nme.Deref()); } // Now we need to introspect the Array Fields @@ -456,3 +458,4 @@ function query(resourceString, queryString, fields) } module.exports = { query: query, queryAsync: queryAsync }; + From 4e2d6ef70d5ec08d4176d4ef295d91f8196008d1 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:12:43 +0000 Subject: [PATCH 07/10] fix(adhoc-sweep-fixes): 15 review findings across 10 files --- .github/workflows/build-openssl-windows.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-openssl-windows.yml b/.github/workflows/build-openssl-windows.yml index 471ca76d3..398427852 100644 --- a/.github/workflows/build-openssl-windows.yml +++ b/.github/workflows/build-openssl-windows.yml @@ -50,9 +50,18 @@ jobs: VERSION="${{ github.event.inputs.openssl_version || '3.5.4' }}" BUILD_DIR="openssl-build-${{ matrix.arch.name }}-${{ matrix.config.suffix }}" curl -L "https://github.com/openssl/openssl/releases/download/openssl-$VERSION/openssl-$VERSION.tar.gz" -o openssl.tar.gz + curl -L "https://github.com/openssl/openssl/releases/download/openssl-$VERSION/openssl-$VERSION.tar.gz.sha256" -o openssl.tar.gz.sha256 + EXPECTED_SHA256="$(cat openssl.tar.gz.sha256 | tr -d '[:space:]')" + ACTUAL_SHA256="$(sha256sum openssl.tar.gz | awk '{print $1}')" + if [ -z "$EXPECTED_SHA256" ] || [ "$EXPECTED_SHA256" != "$ACTUAL_SHA256" ]; then + echo "Checksum verification failed for openssl-$VERSION.tar.gz" + echo "Expected: $EXPECTED_SHA256" + echo "Actual: $ACTUAL_SHA256" + exit 1 + fi mkdir -p "$BUILD_DIR" tar -xzf openssl.tar.gz -C "$BUILD_DIR" --strip-components=1 - rm openssl.tar.gz + rm openssl.tar.gz openssl.tar.gz.sha256 - name: Configure OpenSSL shell: cmd @@ -185,3 +194,4 @@ jobs: name: build-report path: BUILD_REPORT.md retention-days: 90 + From 30fa2a069e86f253ba4b3965fb06fbd515e0f5b3 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:12:45 +0000 Subject: [PATCH 08/10] fix(adhoc-sweep-fixes): 15 review findings across 10 files --- modules/win-virtual-terminal.js | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/modules/win-virtual-terminal.js b/modules/win-virtual-terminal.js index 818ab6a0b..5d589e5a5 100644 --- a/modules/win-virtual-terminal.js +++ b/modules/win-virtual-terminal.js @@ -185,9 +185,29 @@ function vt() } else { + k32.ClosePseudoConsole(ret._h.Deref()); + k32.CloseHandle(ret._input.Deref()); + k32.CloseHandle(ret._output.Deref()); + k32.CloseHandle(ret._consoleInput.Deref()); + k32.CloseHandle(ret._consoleOutput.Deref()); } } - + else + { + k32.ClosePseudoConsole(ret._h.Deref()); + k32.CloseHandle(ret._input.Deref()); + k32.CloseHandle(ret._output.Deref()); + k32.CloseHandle(ret._consoleInput.Deref()); + k32.CloseHandle(ret._consoleOutput.Deref()); + } + } + else + { + k32.ClosePseudoConsole(ret._h.Deref()); + k32.CloseHandle(ret._input.Deref()); + k32.CloseHandle(ret._output.Deref()); + k32.CloseHandle(ret._consoleInput.Deref()); + k32.CloseHandle(ret._consoleOutput.Deref()); } throw ('Internal Error'); } @@ -235,4 +255,4 @@ function vt() if (process.platform == 'win32') { module.exports = new vt(); -} \ No newline at end of file +} From e552c8781344776b7f6d07786f7224b8f5318dc7 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:12:46 +0000 Subject: [PATCH 09/10] fix(adhoc-sweep-fixes): 15 review findings across 10 files --- modules/process-manager.js | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/modules/process-manager.js b/modules/process-manager.js index 9a14eac07..7613a2e94 100644 --- a/modules/process-manager.js +++ b/modules/process-manager.js @@ -166,7 +166,21 @@ function processManager() { p.waitExit(); } - var J = JSON.parse(p.stdout.str); + try + { + var J = JSON.parse(p.stdout.str); + } + catch (parseErr) + { + if (callback) + { + p.args = []; + for (var i = 1; i < arguments.length; ++i) { p.args.push(arguments[i]); } + p.args.unshift(null); + callback.apply(this, p.args); + } + break; + } if (callback) { p.args = []; @@ -209,7 +223,18 @@ function processManager() { if (callback) { - var J = JSON.parse(p.stdout.str); + try + { + var J = JSON.parse(p.stdout.str); + } + catch (parseErr) + { + p.args = []; + for (var i = 1; i < arguments.length; ++i) { p.args.push(arguments[i]); } + p.args.unshift(null); + callback.apply(this, p.args); + break; + } p.args = []; for (var i = 1; i < arguments.length; ++i) { p.args.push(arguments[i]); } if (process.platform == 'freebsd') From 12ebf0bf1154799c5848ca9469bbff1c9de39c02 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 05:12:47 +0000 Subject: [PATCH 10/10] fix(adhoc-sweep-fixes): 15 review findings across 10 files --- modules/RecoveryCore.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/RecoveryCore.js b/modules/RecoveryCore.js index aedef9dd8..fafeae927 100644 --- a/modules/RecoveryCore.js +++ b/modules/RecoveryCore.js @@ -17,7 +17,10 @@ function getOpenFrameMachineId() { ? '/Library/Application Support/OpenFrame/machine_id' : '/var/lib/openframe/machine_id'); openframeMachineId = fs.readFileSync(machineIdPath).toString().trim(); - } catch (ex) { openframeMachineId = null; } + } catch (ex) { + openframeMachineId = null; + try { sendConsoleText('getOpenFrameMachineId error: ' + ex); } catch (ex2) { console.log('getOpenFrameMachineId error: ' + ex); } + } return openframeMachineId; } @@ -502,3 +505,4 @@ function deleteFolderRecursive(path, rec) { fs.unlinkSync(path); } }; +