Project

General

Profile

Action #4786

SRC NULL array (from setArray) not checked

Added by Jean-charles LAMBERT 8 months ago.

Status:
New
Priority:
High
Start date:
05/02/2018
Due date:
% Done:

0%


Description

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

Also available in: Atom PDF

Go to top