diff options
author | tradke <tradke@d60812e6-3970-4df4-986e-c251b06effeb> | 2005-05-24 17:13:18 +0000 |
---|---|---|
committer | tradke <tradke@d60812e6-3970-4df4-986e-c251b06effeb> | 2005-05-24 17:13:18 +0000 |
commit | 1fd6b5a12f7be681486d7ff1af73660bc01f4b04 (patch) | |
tree | 50e9f60639505f6ea5f72263877cfe7749c9967c | |
parent | 70f222615c22e33a6b6b329cc77e79bae4e1658a (diff) |
Check for NULL pointer passed as output array in CCTK_Reduce().
This closes PR CactusPUGH/1934: "CCTK_Reduce does not produce an error message,
but segfaults".
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHReduce/trunk@66 d60812e6-3970-4df4-986e-c251b06effeb
-rw-r--r-- | src/Reduction.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Reduction.c b/src/Reduction.c index 7106dea..0ea8998 100644 --- a/src/Reduction.c +++ b/src/Reduction.c @@ -276,6 +276,12 @@ int PUGH_ReductionGVs (const cGH *GH, return (-1); } + if (outvals == NULL) + { + CCTK_WARN (1, "PUGH_ReductionGVs: NULL pointer passed for output array"); + return (-1); + } + outtypesize = CCTK_VarTypeSize (outtype); if (outtypesize <= 0) { |