Skip to content

Check for nullptr in NcFormat::get/setAttribute#1374

Merged
bendudson merged 1 commit intomasterfrom
NcFormat-attribute-fix
Nov 15, 2018
Merged

Check for nullptr in NcFormat::get/setAttribute#1374
bendudson merged 1 commit intomasterfrom
NcFormat-attribute-fix

Conversation

@johnomotani
Copy link
Contributor

Legacy NetCDF implementation segfaults when trying to get integer attribute that has not been set, due to trying to call var->is_valid() on null pointer var. This PR adds checks for nullptr before checking var->is_valid().

Previously could segfault when trying to get integer attribute that had
not been set, due to trying to call var->is_valid() on null pointer
'var'.
@bendudson bendudson merged commit 29c152f into master Nov 15, 2018
@bendudson bendudson deleted the NcFormat-attribute-fix branch November 15, 2018 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants