httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaillet...@apache.org
Subject svn commit: r1398480 - /httpd/httpd/trunk/modules/mappers/mod_imagemap.c
Date Mon, 15 Oct 2012 19:53:23 GMT
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 */
     }



Mime
View raw message