Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Commit

Permalink
Validates that given tile coordinates are within valid bounds.
Browse files Browse the repository at this point in the history
  • Loading branch information
danpat authored and TheMarex committed May 18, 2016
1 parent 2599560 commit d54c160
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/node_osrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,12 @@ tile_parameters_ptr argumentsToTileParameters(const Nan::FunctionCallbackInfo<v8
params->y = y->Uint32Value();
params->z = z->Uint32Value();

if (!params->IsValid())
{
Nan::ThrowError("Invalid tile coordinates");
return tile_parameters_ptr();
}

return params;
}

Expand Down

0 comments on commit d54c160

Please sign in to comment.