Skip to content

fix(adhoc-sweep-fixes): 35 review findings across 25 files - #95

Draft
flamingo[bot] wants to merge 25 commits into
masterfrom
ai-fix/adhoc-sweep-fixes-d578a228-36292efa
Draft

fix(adhoc-sweep-fixes): 35 review findings across 25 files#95
flamingo[bot] wants to merge 25 commits into
masterfrom
ai-fix/adhoc-sweep-fixes-d578a228-36292efa

Conversation

@flamingo

@flamingo flamingo Bot commented Aug 24, 2026

Copy link
Copy Markdown

Closes 35 review findings across 25 files.

Draft — this is a starting point, not a finished change. The fix required judgment, so read it before trusting it.

Warning

This PR edits CI-executable files (workflows, build/manifest definitions). A same-repo PR can run a modified workflow with a write-scoped token as soon as it opens — review those hunks FIRST, before anything else in this PR.

# Fix confidence Finding Location
1 🟡 85 medium info_GetLocalInterfaces (Windows) leaks pAdapterInfo/pAdapterAddresses on realloc failure paths and does not check malloc failures meshcore/meshinfo.c:84
2 🟡 80 medium POSIX info_GetLocalInterfaces leaks ifc.ifc_req on early-return paths before the loop meshcore/meshinfo.c:258
3 🟢 97 high Undefined variable cpu_Feature (wrong case) used instead of cpu_feature in linux-cpuflags.js modules/linux-cpuflags.js:68
4 🟢 95 high hex2rstr and rstr2hex helper functions in amt-script.js are missing return statements modules/amt-script.js:63
5 🟢 90 high random() in amt-script.js references undeclared global max modules/amt-script.js:65
6 🟡 85 medium apply_labels.py hardcodes a developer's local macOS path, making the script unusable elsewhere docs/modules/apply_labels.py:77
7 🟡 75 medium apply_labels.py uses macOS-only xattr/Finder labeling with no cross-platform guard docs/modules/apply_labels.py:52
8 🟢 90 high Duplicate IP_MULTICAST_LOOP setsockopt call, missing IP_MULTICAST_TTL-equivalent redundancy is a copy/paste bug microstack/ILibMulticastSocket.c:175
9 🟢 90 high Broadcast helper uses shared module->UDPServer socket instead of the per-interface socket it just checked microstack/ILibMulticastSocket.c:221
10 🟢 95 high systemSlots() field populated with wrong parser (systemInfo instead of systemSlots) in smbios.js parse() modules/smbios.js:174
11 🟢 90 high amtInfo() dereferences data[131] without checking it exists, risking a TypeError modules/smbios.js:237
12 🟢 90 high SimpleRendezvousServer.OnRead dereferences resp/postResp without null-checking OnGet/OnPost return values samples/webrtc/C# Sample/SimpleRendezvousServer.cs:150
13 🟢 90 high POST branch dereferences postResp without null check, same defect as GET branch samples/webrtc/C# Sample/SimpleRendezvousServer.cs:168
14 🟢 95 high Unhandled reference to undeclared lines variable in named pipe 'end' handler modules/file-search.js:36
15 🔴 55 low — review closely PowerShell search command built via naive string concatenation of user-controlled root/criteria, allowing script injection modules/file-search.js:62
16 🟢 95 high PE_Parser.js readLenPrefixUnicodeString reads from wrong file offset (hardcoded 0/1 instead of ptr) modules/PE_Parser.js:149
17 🟡 70 medium PE_Parser.js: file descriptor fd is never closed on thrown error paths modules/PE_Parser.js:30
18 🟡 75 medium compress_file_to_gzip WIN32 branch never actually gzip-compresses; produces a plain-copy "archive" with .gz extension and misleading fallback semantics meshcore/openframe_file_logger.h:178
19 🟢 90 high openframe_file_logger.h header comment/macro names disagree with actual LOG_FILENAME value meshcore/openframe_file_logger.h:1
20 🔴 40 low — review closely Typo 'exipiration' vs 'expiration' silently no-ops the Feb-29 leap-year workaround modules/win-crypto.js:220
21 🔴 40 low — review closely Duplicate push into result array in getFirewallRulesAsync2 modules/win-firewall.js:297
22 🟢 95 high ExecSubscribe/ExecUnSubscribe reinitialize 'opaque' parameter, discarding caller's value modules/amt-wsman.js:62
23 🔴 40 low — review closely build-openssl-linux.yml BUILD_REPORT.md heredoc uses unescaped $(date) and $(ls) expansions that will not execute inside a quoted heredoc .github/workflows/build-openssl-linux.yml:232
24 🟡 85 medium OpenSSL build report heredoc uses unescaped $(...) command substitution that will not execute inside a single-quoted heredoc .github/workflows/build-openssl-windows.yml:130
25 🟢 95 high child-container.js: 'user' and 'domain' assigned without var declaration, leaking to outer/global scope modules/child-container.js:143
26 🟡 80 medium zip-reader.js extractAll writes user/zip-controlled entry names to disk without sanitizing path traversal ('..') sequences modules/zip-reader.js:44
27 🔴 40 low — review closely upnpaction.invoke() checks this.arguments.direction instead of this.arguments[i].direction in the missing-parameter branch modules/upnp.js:1
28 🟢 92 high depPath directory read result used without existence guard, will throw ReferenceError on POSIX when readdirSync fails silently modules/exe.js:78
29 🟡 75 medium write_JPEG_buffer has no loop-exit check for row_pointer writes, unconditional infinite risk absent but return code always 0 meshcore/KVM/Linux/linux_compression.c:97
30 🟢 95 high heci.js: deviceDetail = NULL; uses undeclared global NULL instead of null modules/heci.js:253
31 🔴 40 low — review closely QueryKeyLastModified never calls RegCloseKey after RegOpenKeyExW succeeds modules/win-registry.js:168
32 🟢 90 high BUILD_REPORT.md generation uses a single-quoted heredoc so $(date ...) and other command substitutions are never expanded .github/workflows/build-openssl-macos.yml:112
33 🟡 70 medium GitHub Actions matrix downloads openssl_version input string but combine-artifacts job's build report hardcodes version 3.5.4 independent of the workflow_dispatch input .github/workflows/build-openssl-macos.yml:105
34 🔴 40 low — review closely return 0 used inside void-returning ILibAsyncUDPSocket_SetMulticastTTL under SYMBIAN32 guard microstack/ILibAsyncUDPSocket.c:224
35 🟡 60 medium win-kblayout.js contains unreachable code after first process.exit() modules/utils/win-kblayout.js:43

What changed — and what was deliberately left — is explained per finding as inline review comments on the lines each finding touched.


Run: https://product-hub.flamingo.so/admin/code-review
Run id: 36292efa-450d-4316-bb92-99897b2455bd

Merging this PR is recorded as acceptance of the rule that produced it;
closing it unmerged is recorded as rejection. Both feed rule health, so
closing a wrong suggestion is useful rather than merely tidy.

flamingo Bot added 25 commits August 24, 2026 05:17

@flamingo flamingo Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 What this fix changed, finding by finding

35 finding(s) fixed in this draft — 35 explained inline on the diff; 7 low-confidence hunk(s) need close review before merging.

Comment thread meshcore/meshinfo.c
Comment on lines 85 to 97
pAdapterInfo = (IP_ADAPTER_INFO *)malloc(sizeof(IP_ADAPTER_INFO));
if (pAdapterInfo == NULL) return 0;
ulOutBufLen = sizeof(IP_ADAPTER_INFO);
if (GetAdaptersInfo(pAdapterInfo, &ulOutBufLen) != ERROR_SUCCESS) { free(pAdapterInfo); if (ulOutBufLen == 0) return 0; pAdapterInfo = (IP_ADAPTER_INFO *)malloc(ulOutBufLen); }
if (GetAdaptersInfo(pAdapterInfo, &ulOutBufLen) != ERROR_SUCCESS)
{
free(pAdapterInfo);
if (ulOutBufLen == 0) return 0;
pAdapterInfo = (IP_ADAPTER_INFO *)malloc(ulOutBufLen);
if (pAdapterInfo == NULL) return 0;
}

// Get the list of all local interfaces
if ((dwRetVal = GetAdaptersInfo(pAdapterInfo, &ulOutBufLen)) != ERROR_SUCCESS || ulOutBufLen == 0) { free(pAdapterInfo); return 0; }

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 🔴 info_GetLocalInterfaces (Windows) leaks pAdapterInfo/pAdapterAddresses on realloc failure paths and does not check malloc failures

In info_GetLocalInterfaces (Windows/WINSOCK2 branch), added NULL checks after the secondary pAdapterInfo = (IP_ADAPTER_INFO *)malloc(ulOutBufLen); and pAdapterAddresses = (IP_ADAPTER_ADDRESSES *)malloc(ulOutBufLen); reallocation calls, returning 0 (and freeing the sibling allocation where already allocated) instead of falling through to GetAdaptersInfo/GetAdaptersAddresses with a NULL buffer pointer. This directly fixes the unchecked-malloc-then-dereference bug described in the finding.

🤖 Prompt for AI agents
In meshcore/meshinfo.c around line 84, review and complete this code-review fix: info_GetLocalInterfaces (Windows) leaks pAdapterInfo/pAdapterAddresses on realloc failure paths and does not check malloc failures.
What the draft fix changed: In info_GetLocalInterfaces (Windows/WINSOCK2 branch), added NULL checks after the secondary `pAdapterInfo = (IP_ADAPTER_INFO *)malloc(ulOutBufLen);` and `pAdapterAddresses = (IP_ADAPTER_ADDRESSES *)malloc(ulOutBufLen);` reallocation calls, returning 0 (and freeing the sibling allocation where already allocated) instead of falling through to GetAdaptersInfo/GetAdaptersAddresses with a NULL buffer pointer. This directly fixes the unchecked-malloc-then-dereference bug described in the finding.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟡 85 medium — react 👍/👎 to teach the reviewer

Comment thread meshcore/meshinfo.c
Comment on lines 373 to 381
{
++size;
// realloc buffer size until no overflow occurs
if ((ifc.ifc_req = realloc(ifc.ifc_req, IFRSIZE)) == NULL) return 0;
if ((ifc.ifc_req = realloc(ifc.ifc_req, IFRSIZE)) == NULL) { close(sockfd); return 0; }
ifc.ifc_len = IFRSIZE;
if (ioctl(sockfd, SIOCGIFCONF, &ifc) != 0) return 0;
if (ioctl(sockfd, SIOCGIFCONF, &ifc) != 0) { free(ifc.ifc_req); close(sockfd); return 0; }
} while (IFRSIZE <= ifc.ifc_len);

ifr = ifc.ifc_req;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 🟠 POSIX info_GetLocalInterfaces leaks ifc.ifc_req on early-return paths before the loop

In the POSIX branch of info_GetLocalInterfaces, the do/while loop that grows ifc.ifc_req via realloc now closes sockfd before returning 0 on realloc failure, and frees ifc.ifc_req plus closes sockfd before returning 0 when ioctl(sockfd, SIOCGIFCONF, &ifc) fails, eliminating the previously leaked buffer and file descriptor on those early-return paths.

🤖 Prompt for AI agents
In meshcore/meshinfo.c around line 258, review and complete this code-review fix: POSIX info_GetLocalInterfaces leaks ifc.ifc_req on early-return paths before the loop.
What the draft fix changed: In the POSIX branch of info_GetLocalInterfaces, the do/while loop that grows `ifc.ifc_req` via realloc now closes `sockfd` before returning 0 on realloc failure, and frees `ifc.ifc_req` plus closes `sockfd` before returning 0 when `ioctl(sockfd, SIOCGIFCONF, &ifc)` fails, eliminating the previously leaked buffer and file descriptor on those early-return paths.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟡 80 medium — react 👍/👎 to teach the reviewer

Comment thread modules/linux-cpuflags.js
@@ -66,10 +66,10 @@ cpu_feature.X86_FEATURE_LONGRUN = ( 2*32+ 1); /* Longrun power control */
cpu_feature.X86_FEATURE_LRTI = (2 * 32 + 3); /* LongRun table interface */

/* Other features, Linux-defined mapping, word 3 */

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 🔴 Undefined variable cpu_Feature (wrong case) used instead of cpu_feature in linux-cpuflags.js

In the "Other features, Linux-defined mapping, word 3" section, replaced all four occurrences of the undeclared cpu_Feature (capital F) with the correctly-cased cpu_feature object (declared at top of file via var cpu_feature = {}) for the assignments of X86_FEATURE_CXMMX, X86_FEATURE_K6_MTRR, X86_FEATURE_CYRIX_ARR, and X86_FEATURE_CENTAUR_MCR. This ensures these four properties are correctly attached to the exported cpu_feature object (used later via Object.defineProperty(module.exports, "defines", { value: cpu_feature })) instead of leaking as implicit globals or throwing a ReferenceError in strict mode.

🤖 Prompt for AI agents
In modules/linux-cpuflags.js around line 68, review and complete this code-review fix: Undefined variable `cpu_Feature` (wrong case) used instead of `cpu_feature` in linux-cpuflags.js.
What the draft fix changed: In the "Other features, Linux-defined mapping, word 3" section, replaced all four occurrences of the undeclared `cpu_Feature` (capital F) with the correctly-cased `cpu_feature` object (declared at top of file via `var cpu_feature = {}`) for the assignments of `X86_FEATURE_CXMMX`, `X86_FEATURE_K6_MTRR`, `X86_FEATURE_CYRIX_ARR`, and `X86_FEATURE_CENTAUR_MCR`. This ensures these four properties are correctly attached to the exported `cpu_feature` object (used later via `Object.defineProperty(module.exports, "defines", { value: cpu_feature })`) instead of leaking as implicit globals or throwing a ReferenceError in strict mode.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟢 97 high — react 👍/👎 to teach the reviewer

Comment thread modules/amt-script.js
Comment on lines 47 to 55
function btoa(x) { return Buffer.from(x).toString('base64');}
function atob(x) { var z = null; try { z = Buffer.from(x, 'base64').toString(); } catch (e) { console.log(e); } return z; }
function passwordcheck(p) { if (p.length < 8) return false; var upper = 0, lower = 0, number = 0, nonalpha = 0; for (var i in p) { var c = p.charCodeAt(i); if ((c > 64) && (c < 91)) { upper = 1; } else if ((c > 96) && (c < 123)) { lower = 1; } else if ((c > 47) && (c < 58)) { number = 1; } else { nonalpha = 1; } } return ((upper + lower + number + nonalpha) == 4); }
function hex2rstr(x) { Buffer.from(x, 'hex').toString(); }
function rstr2hex(x) { Buffer.from(x).toString('hex'); }
function random() { return Math.floor(Math.random()*max); }
function hex2rstr(x) { return Buffer.from(x, 'hex').toString(); }
function rstr2hex(x) { return Buffer.from(x).toString('hex'); }
function random(max) { return Math.floor(Math.random()*max); }
function rstr_md5(str) { return hex2rstr(hex_md5(str)); }
function getItem(x, y, z) { for (var i in x) { if (x[i][y] == z) return x[i]; } return null; }

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 🟠 hex2rstr and rstr2hex helper functions in amt-script.js are missing return statements

Added return statements to hex2rstr(x) and rstr2hex(x) (lines defining these two functions), so they now return Buffer.from(x, 'hex').toString() and Buffer.from(x).toString('hex') respectively instead of implicitly returning undefined.

🤖 Prompt for AI agents
In modules/amt-script.js around line 63, review and complete this code-review fix: hex2rstr and rstr2hex helper functions in amt-script.js are missing return statements.
What the draft fix changed: Added `return` statements to `hex2rstr(x)` and `rstr2hex(x)` (lines defining these two functions), so they now return `Buffer.from(x, 'hex').toString()` and `Buffer.from(x).toString('hex')` respectively instead of implicitly returning `undefined`.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟢 95 high — react 👍/👎 to teach the reviewer

Comment thread modules/amt-script.js
Comment on lines 47 to 55
function btoa(x) { return Buffer.from(x).toString('base64');}
function atob(x) { var z = null; try { z = Buffer.from(x, 'base64').toString(); } catch (e) { console.log(e); } return z; }
function passwordcheck(p) { if (p.length < 8) return false; var upper = 0, lower = 0, number = 0, nonalpha = 0; for (var i in p) { var c = p.charCodeAt(i); if ((c > 64) && (c < 91)) { upper = 1; } else if ((c > 96) && (c < 123)) { lower = 1; } else if ((c > 47) && (c < 58)) { number = 1; } else { nonalpha = 1; } } return ((upper + lower + number + nonalpha) == 4); }
function hex2rstr(x) { Buffer.from(x, 'hex').toString(); }
function rstr2hex(x) { Buffer.from(x).toString('hex'); }
function random() { return Math.floor(Math.random()*max); }
function hex2rstr(x) { return Buffer.from(x, 'hex').toString(); }
function rstr2hex(x) { return Buffer.from(x).toString('hex'); }
function random(max) { return Math.floor(Math.random()*max); }
function rstr_md5(str) { return hex2rstr(hex_md5(str)); }
function getItem(x, y, z) { for (var i in x) { if (x[i][y] == z) return x[i]; } return null; }

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 🟠 random() in amt-script.js references undeclared global max

Changed function random() to function random(max) so the max parameter is explicitly declared and used in Math.floor(Math.random()*max), fixing the undeclared-global reference. This matches the suggested fix exactly and does not alter the calling convention already used by script_functionTableX2 (which passes argsval[1] as max).

🤖 Prompt for AI agents
In modules/amt-script.js around line 65, review and complete this code-review fix: random() in amt-script.js references undeclared global `max`.
What the draft fix changed: Changed `function random()` to `function random(max)` so the `max` parameter is explicitly declared and used in `Math.floor(Math.random()*max)`, fixing the undeclared-global reference. This matches the suggested fix exactly and does not alter the calling convention already used by `script_functionTableX2` (which passes `argsval[1]` as `max`).
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟢 90 high — react 👍/👎 to teach the reviewer

Comment thread modules/win-registry.js
Comment on lines 203 to 216
v = this._AdvApi.RegQueryInfoKeyW(h.Deref(), achClass, achClassSize, 0,
numSubKeys, longestSubkeySize, longestClassString, numValues,
longestValueName, longestValueData, securityDescriptor, lastWriteTime);
if (v.Val != 0) { throw ('RegQueryInfoKeyW() returned error: ' + v.Val); }
if (v.Val != 0) { this._AdvApi.RegCloseKey(h.Deref()); throw ('RegQueryInfoKeyW() returned error: ' + v.Val); }

// Convert the time format
var systime = this._marshal.CreateVariable(16);
if (this._Kernel32.FileTimeToSystemTime(lastWriteTime, systime).Val == 0) { throw ('Error parsing time'); }
return (require('fs').convertFileTime(lastWriteTime));
if (this._Kernel32.FileTimeToSystemTime(lastWriteTime, systime).Val == 0) { this._AdvApi.RegCloseKey(h.Deref()); throw ('Error parsing time'); }
var result = require('fs').convertFileTime(lastWriteTime);
this._AdvApi.RegCloseKey(h.Deref());
return (result);
};

this.WriteKey = function WriteKey(hkey, path, key, value)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 🟠 QueryKeyLastModified never calls RegCloseKey after RegOpenKeyExW succeeds

In QueryKeyLastModified, added this._AdvApi.RegCloseKey(h.Deref()) before both throw statements (RegQueryInfoKeyW failure and FileTimeToSystemTime failure) and on the success path — the result is now captured in a local result variable, the handle is closed, and then result is returned, matching the pattern used in QueryKey, WriteKey, and DeleteKey.

(Automatically downgraded: no change in this fix lands near this finding's line — verify whether it was actually addressed.)

🤖 Prompt for AI agents
In modules/win-registry.js around line 168, review and complete this code-review fix: QueryKeyLastModified never calls RegCloseKey after RegOpenKeyExW succeeds.
What the draft fix changed: In `QueryKeyLastModified`, added `this._AdvApi.RegCloseKey(h.Deref())` before both throw statements (RegQueryInfoKeyW failure and FileTimeToSystemTime failure) and on the success path — the result is now captured in a local `result` variable, the handle is closed, and then `result` is returned, matching the pattern used in `QueryKey`, `WriteKey`, and `DeleteKey`.

_(Automatically downgraded: no change in this fix lands near this finding's line — verify whether it was actually addressed.)_
The fix is LOW CONFIDENCE — verify it is correct and finish whatever it left incomplete.

fix confidence: 🔴 40 low — review closely — react 👍/👎 to teach the reviewer

Comment on lines 113 to 127
- name: Upload combined artifact
uses: actions/upload-artifact@v4
with:
name: openssl-3.5.4-macos-all
name: openssl-${{ github.event.inputs.openssl_version || '3.5.4' }}-macos-all
path: openssl-macos-libs/
retention-days: 90

- name: Create build report
run: |
cat > BUILD_REPORT.md << 'EOF'
# OpenSSL 3.5.4 macOS Build Report
OPENSSL_VERSION="${{ github.event.inputs.openssl_version || '3.5.4' }}"
cat > BUILD_REPORT.md << EOF
# OpenSSL $OPENSSL_VERSION macOS Build Report

## Build Date
$(date -u +"%Y-%m-%d %H:%M:%S UTC")

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 🔵 BUILD_REPORT.md generation uses a single-quoted heredoc so $(date ...) and other command substitutions are never expanded

In the "Create build report" step, changed the heredoc delimiter from single-quoted << 'EOF' to unquoted << EOF, and escaped literal ` characters (backtick code fences) with backslashes so they are not misinterpreted as command substitution by the shell now that the heredoc body is expanded. This allows $(date -u +...) and the $(ls -lh ...) listings to be executed and substituted into BUILD_REPORT.md as intended.

🤖 Prompt for AI agents
In .github/workflows/build-openssl-macos.yml around line 112, review and complete this code-review fix: BUILD_REPORT.md generation uses a single-quoted heredoc so $(date ...) and other command substitutions are never expanded.
What the draft fix changed: In the "Create build report" step, changed the heredoc delimiter from single-quoted `<< 'EOF'` to unquoted `<< EOF`, and escaped literal `` ` `` characters (backtick code fences) with backslashes so they are not misinterpreted as command substitution by the shell now that the heredoc body is expanded. This allows `$(date -u +...)` and the `$(ls -lh ...)` listings to be executed and substituted into BUILD_REPORT.md as intended.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟢 90 high — react 👍/👎 to teach the reviewer

Comment on lines 113 to 127
- name: Upload combined artifact
uses: actions/upload-artifact@v4
with:
name: openssl-3.5.4-macos-all
name: openssl-${{ github.event.inputs.openssl_version || '3.5.4' }}-macos-all
path: openssl-macos-libs/
retention-days: 90

- name: Create build report
run: |
cat > BUILD_REPORT.md << 'EOF'
# OpenSSL 3.5.4 macOS Build Report
OPENSSL_VERSION="${{ github.event.inputs.openssl_version || '3.5.4' }}"
cat > BUILD_REPORT.md << EOF
# OpenSSL $OPENSSL_VERSION macOS Build Report

## Build Date
$(date -u +"%Y-%m-%d %H:%M:%S UTC")

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 🔵 GitHub Actions matrix downloads openssl_version input string but combine-artifacts job's build report hardcodes version 3.5.4 independent of the workflow_dispatch input

Introduced OPENSSL_VERSION="${{ github.event.inputs.openssl_version || '3.5.4' }}" in the "Create build report" step and used $OPENSSL_VERSION in the report title instead of the hardcoded "3.5.4". Also changed the "Upload combined artifact" step's name: field from hardcoded openssl-3.5.4-macos-all to openssl-${{ github.event.inputs.openssl_version || '3.5.4' }}-macos-all so the artifact name reflects the actual dispatched version. Not verified against actual GitHub Actions artifact-name character restrictions for arbitrary version strings, but default behavior is unchanged.

🤖 Prompt for AI agents
In .github/workflows/build-openssl-macos.yml around line 105, review and complete this code-review fix: GitHub Actions matrix downloads openssl_version input string but combine-artifacts job's build report hardcodes version 3.5.4 independent of the workflow_dispatch input.
What the draft fix changed: Introduced `OPENSSL_VERSION="${{ github.event.inputs.openssl_version || '3.5.4' }}"` in the "Create build report" step and used `$OPENSSL_VERSION` in the report title instead of the hardcoded "3.5.4". Also changed the "Upload combined artifact" step's `name:` field from hardcoded `openssl-3.5.4-macos-all` to `openssl-${{ github.event.inputs.openssl_version || '3.5.4' }}-macos-all` so the artifact name reflects the actual dispatched version. Not verified against actual GitHub Actions artifact-name character restrictions for arbitrary version strings, but default behavior is unchanged.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟡 70 medium — react 👍/👎 to teach the reviewer

Comment on lines 286 to 292
{
struct sockaddr_in6 localAddress;
#if defined(__SYMBIAN32__)
return 0;
return;
#else
#if defined(WIN32) || defined(_WIN32_WCE)
SOCKET s = *((SOCKET*)ILibAsyncSocket_GetSocket(module));

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 🔵 return 0 used inside void-returning ILibAsyncUDPSocket_SetMulticastTTL under SYMBIAN32 guard

In ILibAsyncUDPSocket_SetMulticastTTL, changed return 0; to return; inside the #if defined(__SYMBIAN32__) branch, since the function is declared void and returning a value is invalid. This is a minimal, mechanical fix that resolves the latent compile-time defect noted in the finding without altering behavior on any currently-built platform (the guard remains dead code on all supported toolchains).

(Automatically downgraded: no change in this fix lands near this finding's line — verify whether it was actually addressed.)

🤖 Prompt for AI agents
In microstack/ILibAsyncUDPSocket.c around line 224, review and complete this code-review fix: return 0 used inside void-returning ILibAsyncUDPSocket_SetMulticastTTL under __SYMBIAN32__ guard.
What the draft fix changed: In ILibAsyncUDPSocket_SetMulticastTTL, changed `return 0;` to `return;` inside the `#if defined(__SYMBIAN32__)` branch, since the function is declared `void` and returning a value is invalid. This is a minimal, mechanical fix that resolves the latent compile-time defect noted in the finding without altering behavior on any currently-built platform (the guard remains dead code on all supported toolchains).

_(Automatically downgraded: no change in this fix lands near this finding's line — verify whether it was actually addressed.)_
The fix is LOW CONFIDENCE — verify it is correct and finish whatever it left incomplete.

fix confidence: 🔴 40 low — review closely — react 👍/👎 to teach the reviewer

console.log('Value saved to clipboard...');
require('clipboard')(str);
process.exit();

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 🔵 win-kblayout.js contains unreachable code after first process.exit()

Removed the first console.log('Value saved to clipboard...'); require('clipboard')(str); process.exit(); block that followed the toLang string construction (immediately after the first for loop / str += '}';), which was terminating the process before the second var check = {}; block could execute. The second block's identical trailing console.log(...); require('clipboard')(...); process.exit(); sequence remains as the single exit point, so the previously unreachable code (bignum-based switch generation) now executes. Risk: this changes runtime behavior — only the second block's output is now ever produced/copied to clipboard, whereas the first block's toLang string is now generated but never logged or copied; a complete fix may require preserving/using both outputs (e.g., concatenating or writing to separate destinations), which requires product-intent clarification beyond this file's evidence.

🤖 Prompt for AI agents
In modules/utils/win-kblayout.js around line 43, review and complete this code-review fix: win-kblayout.js contains unreachable code after first process.exit().
What the draft fix changed: Removed the first `console.log('Value saved to clipboard...'); require('clipboard')(str); process.exit();` block that followed the `toLang` string construction (immediately after the first `for` loop / `str += '}';`), which was terminating the process before the second `var check = {};` block could execute. The second block's identical trailing `console.log(...); require('clipboard')(...); process.exit();` sequence remains as the single exit point, so the previously unreachable code (bignum-based switch generation) now executes. Risk: this changes runtime behavior — only the second block's output is now ever produced/copied to clipboard, whereas the first block's `toLang` string is now generated but never logged or copied; a complete fix may require preserving/using both outputs (e.g., concatenating or writing to separate destinations), which requires product-intent clarification beyond this file's evidence.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟡 60 medium — react 👍/👎 to teach the reviewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants