mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[GH-ISSUE #543] Bug: Invalid borderStyle value causes segmentation fault #145
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#145
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @beorn on GitHub (Jan 16, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/543
Originally assigned to: @msmps on GitHub.
Environment
Description
When using an invalid
borderStylevalue (e.g.,"round"instead of the valid"rounded"), the application crashes with a segmentation fault instead of showing an error or falling back to a default style.Reproduction
Expected Behavior
Either:
Actual Behavior
Segmentation fault at address 0x10 or 0x48:
Analysis
The crash occurs in the native Zig library (
libopentui.dylib). The invalid borderStyle value"round"likely causes an out-of-bounds lookup in theBorderCharsrecord which expects only:"single" | "double" | "rounded" | "heavy".Workaround
Use only valid borderStyle values:
"single","double","rounded", or"heavy".Suggestion
Add input validation for borderStyle in the JavaScript layer before passing to the native Zig code: