Skip to content

fixes #213 - handle GetColumnNames with empty column row#215

Merged
d99kris merged 4 commits intomasterfrom
dev/integrate-getcolumnnames-empty-label-row
Apr 12, 2026
Merged

fixes #213 - handle GetColumnNames with empty column row#215
d99kris merged 4 commits intomasterfrom
dev/integrate-getcolumnnames-empty-label-row

Conversation

@d99kris
Copy link
Copy Markdown
Owner

@d99kris d99kris commented Apr 12, 2026

Original PR in #214 by @MarkLee131.

MarkLee131 and others added 4 commits April 7, 2026 00:39
GetColumnNames() did .begin() + (mRowNameIdx + 1) on the label row
without checking that the row has enough elements. When the label row
is empty (e.g. after InsertRow on an empty document with LabelParams(0,0)),
.begin() wraps a null pointer and adding to it is undefined behavior.

Add a bounds check before the iterator arithmetic so it returns an
empty vector instead of hitting UB.
…l-row

fix GetColumnNames() undefined behavior on empty label row
@d99kris d99kris self-assigned this Apr 12, 2026
@d99kris d99kris merged commit ab199f5 into master Apr 12, 2026
6 checks passed
@d99kris d99kris deleted the dev/integrate-getcolumnnames-empty-label-row branch April 12, 2026 04:53
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.

2 participants