Bug 292 - Added more checks on zone polygons.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1966 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
f22af5fc67
commit
79ca312388
|
@ -877,7 +877,10 @@ int Zone::Load( Monitor *monitor, Zone **&zones )
|
||||||
Debug( 5, ( "Parsing polygon %s", Coords ));
|
Debug( 5, ( "Parsing polygon %s", Coords ));
|
||||||
Polygon polygon;
|
Polygon polygon;
|
||||||
if ( !ParsePolygonString( Coords, polygon ) )
|
if ( !ParsePolygonString( Coords, polygon ) )
|
||||||
continue;
|
Fatal(( "Unable to parse polygon string '%s' for zone %d/%s for monitor %s", Coords, Id, Name, monitor->Name() ));
|
||||||
|
|
||||||
|
if ( polygon.LoX() < 0 || polygon.HiX() >= monitor->Width() || polygon.LoY() < 0 || polygon.HiY() >= monitor->Height() )
|
||||||
|
Fatal(( "Zone %d/%s for monitor %s extends outside of image dimensions", Id, Name, monitor->Name() ));
|
||||||
|
|
||||||
if ( false && !strcmp( Units, "Percent" ) )
|
if ( false && !strcmp( Units, "Percent" ) )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue