Skip to content

prevent out of bound color values in doSetTile_char - #5864

Merged
ab9rf merged 2 commits into
DFHack:developfrom
ab9rf:pen-color-safety
Aug 5, 2026
Merged

prevent out of bound color values in doSetTile_char#5864
ab9rf merged 2 commits into
DFHack:developfrom
ab9rf:pen-color-safety

Conversation

@ab9rf

@ab9rf ab9rf commented Aug 5, 2026

Copy link
Copy Markdown
Member

some Lua code is leaking a bg of -1 into this function, resulting in an out of bounds reference to uccolor. this logic prohibits such out of bound reads

the upstream problem still needs to be found

upstream problem has been found and addressed here

@ab9rf ab9rf changed the title prevent out of vound color values in doSetTile_char prevent out of bound color values in doSetTile_char Aug 5, 2026
@ab9rf
ab9rf force-pushed the pen-color-safety branch 2 times, most recently from 5e269db to 04873c1 Compare August 5, 2026 09:21
some Lua code is leaking a bg of -1 into this function, resulting in an out of bounds reference to `uccolor`. this logic prohibits such out of bound reads

the upstream problem still needs to be found
@ab9rf
ab9rf force-pushed the pen-color-safety branch from 1375e46 to e274bc7 Compare August 5, 2026 12:25
@ab9rf
ab9rf merged commit 58fd12f into DFHack:develop Aug 5, 2026
14 checks passed
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.

1 participant