Commit 17f5f4b4 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

gridCreate: check gridsize

parent 44b5363c
......@@ -15,6 +15,7 @@
#include "resource_unpack.h"
#include "namespace.h"
#include "serialize.h"
#include "dtypes.h"
#ifndef RAD2DEG
#define RAD2DEG (180./M_PI) /* conversion for rad to deg */
......@@ -386,6 +387,8 @@ int gridCreate(int gridtype, int size)
if ( CDI_Debug )
Message("gridtype: %d size: %d", gridtype, size);
if ( size < 0 || size > INT_MAX ) Error("grid size (%d) out of bounds (0 - %d)!", size, INT_MAX);
gridInit ();
gridptr = gridNewEntry();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment