[REDMINE1D-259] [RM-4786] SRC NULL array (from setArray) not checked Created: 08/Jul/23  Updated: 08/Jul/23

Status: Open
Project: 1D Redmine
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: Redmine-Jira Migtation Assignee: Redmine-Jira Migtation
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Created on 2018-05-02 14:22:19 by Jean-charles Lambert. % Done: 0

if a user setData() with velocity not allocated (vel=NULL), unsio API does not check NULL array and crashs.

see for example :
template <class T> int CSnapshotNemoOut<T>::setArray(const int _n, const int dim, T * src, T ** dest, const char * name, const int tbits, const bool addr)

but must be valid for all others interface.

Put an assert(T!=NULL) or don't set bit |= bits


Generated at Sat Feb 10 15:30:54 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.