diff --git a/src/node_osrm_support.hpp b/src/node_osrm_support.hpp index 66688d0..2b09312 100644 --- a/src/node_osrm_support.hpp +++ b/src/node_osrm_support.hpp @@ -562,6 +562,12 @@ argumentsToTileParameters(const Nan::FunctionCallbackInfo &args, bool params->y = y->Uint32Value(); params->z = z->Uint32Value(); + if (!params->IsValid()) + { + Nan::ThrowError("Invalid tile coordinates"); + return tile_parameters_ptr(); + } + return params; }