This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 6dc89fe062a9ab9d8d37140aa344c1c0c7f03e08
Author: Donny <m4n4t4...@gmail.com>
Date:   Mon Jul 13 07:03:51 2015 -0400

    All: Fix range checks for numBorders in CM_AddFacetBevels
---
 MP/code/qcommon/cm_patch.c | 10 ++++++++--
 SP/code/qcommon/cm_patch.c | 10 ++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/MP/code/qcommon/cm_patch.c b/MP/code/qcommon/cm_patch.c
index e279e4b..6cdf0c3 100644
--- a/MP/code/qcommon/cm_patch.c
+++ b/MP/code/qcommon/cm_patch.c
@@ -891,8 +891,9 @@ void CM_AddFacetBevels( facet_t *facet ) {
                        }
 
                        if ( i == facet->numBorders ) {
-                               if ( facet->numBorders > 4 + 6 + 16 ) {
+                               if ( facet->numBorders >= 4 + 6 + 16 ) {
                                        Com_Printf( "ERROR: too many bevels\n" 
);
+                                       continue;
                                }
                                facet->borderPlanes[facet->numBorders] = 
CM_FindPlane2( plane, &flipped );
                                facet->borderNoAdjust[facet->numBorders] = 0;
@@ -961,8 +962,9 @@ void CM_AddFacetBevels( facet_t *facet ) {
                                }
 
                                if ( i == facet->numBorders ) {
-                                       if ( facet->numBorders > 4 + 6 + 16 ) {
+                                       if ( facet->numBorders >= 4 + 6 + 16 ) {
                                                Com_Printf( "ERROR: too many 
bevels\n" );
+                                               continue;
                                        }
                                        facet->borderPlanes[facet->numBorders] 
= CM_FindPlane2( plane, &flipped );
 
@@ -1002,6 +1004,10 @@ void CM_AddFacetBevels( facet_t *facet ) {
 
 #ifndef BSPC
        //add opposite plane
+       if ( facet->numBorders >= 4 + 6 + 16 ) {
+               Com_Printf( "ERROR: too many bevels\n" );
+               return;
+       }
        facet->borderPlanes[facet->numBorders] = facet->surfacePlane;
        facet->borderNoAdjust[facet->numBorders] = 0;
        facet->borderInward[facet->numBorders] = qtrue;
diff --git a/SP/code/qcommon/cm_patch.c b/SP/code/qcommon/cm_patch.c
index 22a5ebc..19814c3 100644
--- a/SP/code/qcommon/cm_patch.c
+++ b/SP/code/qcommon/cm_patch.c
@@ -884,8 +884,9 @@ void CM_AddFacetBevels( facet_t *facet ) {
                        }
 
                        if ( i == facet->numBorders ) {
-                               if ( facet->numBorders > 4 + 6 + 16 ) {
+                               if ( facet->numBorders >= 4 + 6 + 16 ) {
                                        Com_Printf( "ERROR: too many bevels\n" 
);
+                                       continue;
                                }
                                facet->borderPlanes[facet->numBorders] = 
CM_FindPlane2( plane, &flipped );
                                facet->borderNoAdjust[facet->numBorders] = 0;
@@ -954,8 +955,9 @@ void CM_AddFacetBevels( facet_t *facet ) {
                                }
 
                                if ( i == facet->numBorders ) {
-                                       if ( facet->numBorders > 4 + 6 + 16 ) {
+                                       if ( facet->numBorders >= 4 + 6 + 16 ) {
                                                Com_Printf( "ERROR: too many 
bevels\n" );
+                                               continue;
                                        }
                                        facet->borderPlanes[facet->numBorders] 
= CM_FindPlane2( plane, &flipped );
 
@@ -994,6 +996,10 @@ void CM_AddFacetBevels( facet_t *facet ) {
 
 #ifndef BSPC
        //add opposite plane
+       if ( facet->numBorders >= 4 + 6 + 16 ) {
+               Com_Printf( "ERROR: too many bevels\n" );
+               return;
+       }
        facet->borderPlanes[facet->numBorders] = facet->surfacePlane;
        facet->borderNoAdjust[facet->numBorders] = 0;
        facet->borderInward[facet->numBorders] = qtrue;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/iortcw.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to