You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2012/10/15 21:53:23 UTC

svn commit: r1398480 - /httpd/httpd/trunk/modules/mappers/mod_imagemap.c

Author: jailletc36
Date: Mon Oct 15 19:53:22 2012
New Revision: 1398480

URL: http://svn.apache.org/viewvc?rev=1398480&view=rev
Log:
cppcheck: arrayIndexThenCheck - change the order of the tests in order to avoid a
potential out-of-bound access. I think that this module is obsolete, but doing so reduces
the noise in cppcheck output...

Modified:
    httpd/httpd/trunk/modules/mappers/mod_imagemap.c

Modified: httpd/httpd/trunk/modules/mappers/mod_imagemap.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_imagemap.c?rev=1398480&r1=1398479&r2=1398480&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_imagemap.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_imagemap.c Mon Oct 15 19:53:22 2012
@@ -176,7 +176,7 @@ static int pointinpoly(const double poin
     int i, numverts, crossings = 0;
     double x = point[X], y = point[Y];
 
-    for (numverts = 0; pgon[numverts][X] != -1 && numverts < MAXVERTS;
+    for (numverts = 0; numverts < MAXVERTS && pgon[numverts][X] != -1;
         numverts++) {
         /* just counting the vertexes */
     }