Skip to content

Return NULL instead of dereferencing a null jaspObject - #217

Merged
JorisGoosen merged 1 commit into
masterfrom
fixNullDerefInFindObject
Sep 9, 2026
Merged

JorisGoosen merged 1 commit into
masterfrom
fixNullDerefInFindObject

Conversation

@boutinb

@boutinb boutinb commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

jaspContainer::findObjectWithUniqueNestedName returns nullptr when it finds nothing, but the Rcpp interface handed that straight to wrapJaspObject, whose first statement is ref->getType(). The engine therefore segfaults whenever editImage is asked for a plot that is not in jaspResults, even though jaspBase::editImage already handles the NULL case ("no jasp plot found").

jaspContainer::findObjectWithUniqueNestedName returns nullptr when it finds
nothing, but the Rcpp interface handed that straight to wrapJaspObject, whose
first statement is ref->getType(). The engine therefore segfaults whenever
editImage is asked for a plot that is not in jaspResults, even though
jaspBase::editImage already handles the NULL case ("no jasp plot found").

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@JorisGoosen
JorisGoosen merged commit f6e133c into master Sep 9, 2026
19 of 21 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.

2 participants