Skip to content

docs: guard against NULL history.entries in README example#199

Open
SAY-5 wants to merge 1 commit into
asdf-format:mainfrom
SAY-5:fix-history-entries-null-guard
Open

docs: guard against NULL history.entries in README example#199
SAY-5 wants to merge 1 commit into
asdf-format:mainfrom
SAY-5:fix-history-entries-null-guard

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jun 18, 2026

Copy link
Copy Markdown

Closes #196. The cube example does meta->history.entries[0] directly, but entries is NULL when the file has no history (it only gets allocated when the history mapping has an "entries" key, see src/core/asdf.c), so the example segfaults on any file without a history entry. Added a NULL check on entries itself before indexing it.

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
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.

Running cube example in readme can crash on some files

1 participant