# HG changeset patch # User Matti Hamalainen # Date 1509475802 -7200 # Node ID 5f574f78eff6b521570c81413ea79a37626f9a9e # Parent 0402237b734eff28eebacfc48e465920c624775f Limit search block max size. diff -r 0402237b734e -r 5f574f78eff6 mapsearch.c --- a/mapsearch.c Tue Oct 31 19:43:44 2017 +0200 +++ b/mapsearch.c Tue Oct 31 20:50:02 2017 +0200 @@ -734,6 +734,13 @@ goto out; } + + if (width * height > 400) + { + *verr = "Search block pattern too large."; + goto out; + } + if ((pattern = mapBlockAlloc(width, height)) == NULL) goto out;