[PR #531] [MERGED] fix(native): reject trailing text in lipo integers and keep multi-word otool keys #2051

Closed
opened 2026-10-16 21:13:45 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/531
Author: @morluto
Created: 10/5/2026
Status: ✅ Merged
Merged: 10/5/2026
Merged by: @morluto

Base: main ← Head: cleanup/native-numeric-fields


📝 Commits (1)

  • e3ed8a3 fix(native): reject trailing text in lipo integers and keep multi-word otool keys

📊 Changes

4 files changed (+26 additions, -2 deletions)

View changed files

📝 src/native/parsers/lipo.ts (+1 -1)
📝 src/native/parsers/otool.ts (+1 -1)
📝 tests/boundary/providers/native/nativeMachoHeader.golden.test.ts (+10 -0)
📝 tests/boundary/providers/native/nativeProvider.test.ts (+14 -0)

📄 Description

Follow-up sweep from the contributor-PR review.

  • lipo.ts integer() used bare parseInt, so offset 16384 trailing-junk parsed as 16384 and size 0x10 as 0. Now requires a full decimal field (same bug class as #520).
  • otool.ts parseFields key regex only tolerated one version suffix, so time stamp 2 Thu… parsed as {time: 'stamp 2…'}. Now also accepts stamp.

Tests: hostile lipo block asserts nulls; golden test asserts time stamp survives as a full key and no bare time key exists. Ran native golden/provider suites + tsc + prettier.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/531 **Author:** [@morluto](https://github.com/morluto) **Created:** 10/5/2026 **Status:** ✅ Merged **Merged:** 10/5/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `cleanup/native-numeric-fields` --- ### 📝 Commits (1) - [`e3ed8a3`](https://github.com/morluto/rea/commit/e3ed8a39006e9389442eb5720bc781bddc5e2b68) fix(native): reject trailing text in lipo integers and keep multi-word otool keys ### 📊 Changes **4 files changed** (+26 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/native/parsers/lipo.ts` (+1 -1) 📝 `src/native/parsers/otool.ts` (+1 -1) 📝 `tests/boundary/providers/native/nativeMachoHeader.golden.test.ts` (+10 -0) 📝 `tests/boundary/providers/native/nativeProvider.test.ts` (+14 -0) </details> ### 📄 Description Follow-up sweep from the contributor-PR review. - `lipo.ts integer()` used bare `parseInt`, so `offset 16384 trailing-junk` parsed as 16384 and `size 0x10` as 0. Now requires a full decimal field (same bug class as #520). - `otool.ts parseFields` key regex only tolerated one ` version` suffix, so `time stamp 2 Thu…` parsed as `{time: 'stamp 2…'}`. Now also accepts `stamp`. Tests: hostile lipo block asserts nulls; golden test asserts `time stamp` survives as a full key and no bare `time` key exists. Ran native golden/provider suites + tsc + prettier. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:13:45 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2051
No description provided.