[mupen64plus-video-rice] 68/191: Remove write-only member variables m_bClampS and m_bClampT

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:17:18 UTC 2015


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

ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-video-rice.

commit 62346880812ad48de085492eb223b6b59d02ecd2
Author: Sven Eckelmann <sven at narfation.org>
Date:   Sun Jul 24 10:59:52 2011 +0200

    Remove write-only member variables m_bClampS and m_bClampT
    
    Write access to m_bClampS and m_bClampT resulted in memory corruption due to
    write access outside of the array bounds. It is never read and thus it can
    savely be removed.
---
 debian/changelog                    |  2 ++
 debian/patches/series               |  1 +
 debian/patches/wom_corruption.patch | 70 +++++++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 21f2d5f..3589914 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,8 @@ mupen64plus-video-rice (1.99.4-3) UNRELEASED; urgency=low
     - Add portable_movsxl.patch, Replace movsxl with more portable mnemonic
       movslq
     - Add infinit_loop.patch, Fix double infinit loop in GetValidTmemInfoIndex
+    - Add wom_corruption.patch, Remove write-only member variables m_bClampS and
+      m_bClampT
   * Depend on pkg-config in debian/control for new Makefile
 
  -- Sven Eckelmann <sven at narfation.org>  Sat, 23 Jul 2011 16:42:59 +0200
diff --git a/debian/patches/series b/debian/patches/series
index 08042c6..e042794 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ divide_by_zero.patch
 undefined_functions.patch
 portable_movsxl.patch
 infinit_loop.patch
+wom_corruption.patch
diff --git a/debian/patches/wom_corruption.patch b/debian/patches/wom_corruption.patch
new file mode 100644
index 0000000..8ea6e34
--- /dev/null
+++ b/debian/patches/wom_corruption.patch
@@ -0,0 +1,70 @@
+Description: Remove write-only member variables m_bClampS and m_bClampT
+ Write access to m_bClampS and m_bClampT resulted in memory corruption due to
+ write access outside of the array bounds. It is never read and thus it can
+ savely be removed.
+Origin: upstream, https://bitbucket.org/richard42/mupen64plus-video-rice/changeset/d1f899eef3ee
+Author: Sven Eckelmann <sven at narfation.org>
+
+---
+diff --git a/src/OGLExtRender.cpp b/src/OGLExtRender.cpp
+index 7cc1e1cb4c71e56e343cde2b9f5fe9e67d16ee34..c58a61da3f98662115f7fcf8910250d2e1ba4a5c 100644
+--- a/src/OGLExtRender.cpp
++++ b/src/OGLExtRender.cpp
+@@ -170,7 +170,6 @@ void COGLExtRender::SetTextureUFlag(TextureUVFlag dwFlag, uint32 dwTile)
+                 BindTexture(pTexture->m_dwTextureName, textureNo);
+             }
+             SetTexWrapS(textureNo, OGLXUVFlagMaps[dwFlag].realFlag);
+-            m_bClampS[textureNo] = dwFlag==TEXTURE_UV_FLAG_CLAMP?true:false;
+         }
+     }
+ }
+@@ -212,7 +211,6 @@ void COGLExtRender::SetTextureVFlag(TextureUVFlag dwFlag, uint32 dwTile)
+                 BindTexture(pTexture->m_dwTextureName, textureNo);
+             }
+             SetTexWrapT(textureNo, OGLXUVFlagMaps[dwFlag].realFlag);
+-            m_bClampT[textureNo] = dwFlag==TEXTURE_UV_FLAG_CLAMP?true:false;
+         }
+     }
+ }
+diff --git a/src/OGLRender.cpp b/src/OGLRender.cpp
+index 7ae7e7d4a0d2ac2d789890180c35fff80472223b..8b883bf7cc73de70c2fe343ae5f90e5c38115ad4 100644
+--- a/src/OGLRender.cpp
++++ b/src/OGLRender.cpp
+@@ -41,8 +41,6 @@ OGLRender::OGLRender()
+     m_bSupportFogCoordExt = pcontext->m_bSupportFogCoord;
+     m_bMultiTexture = pcontext->m_bSupportMultiTexture;
+     m_bSupportClampToEdge = false;
+-    m_bClampS[0] = false;
+-    m_bClampT[0] = m_bClampT[1] = false;
+     for( int i=0; i<8; i++ )
+     {
+         m_curBoundTex[i]=0;
+@@ -487,7 +485,6 @@ void OGLRender::SetTextureUFlag(TextureUVFlag dwFlag, uint32 dwTile)
+             BindTexture(pTexture->m_dwTextureName, 0);
+         }
+         SetTexWrapS(0, OGLXUVFlagMaps[dwFlag].realFlag);
+-        m_bClampS[0] = dwFlag==TEXTURE_UV_FLAG_CLAMP?true:false;
+     }
+ }
+ void OGLRender::SetTextureVFlag(TextureUVFlag dwFlag, uint32 dwTile)
+@@ -502,7 +499,6 @@ void OGLRender::SetTextureVFlag(TextureUVFlag dwFlag, uint32 dwTile)
+             BindTexture(pTexture->m_dwTextureName, 0);
+         }
+         SetTexWrapT(0, OGLXUVFlagMaps[dwFlag].realFlag);
+-        m_bClampT[0] = dwFlag==TEXTURE_UV_FLAG_CLAMP?true:false;
+     }
+ }
+ 
+diff --git a/src/OGLRender.h b/src/OGLRender.h
+index 750b754b072f0e1dbecf7efba08830b0c0417feb..d5fb387aba5f871dfa0f9d6ed456724e30cd0ea0 100644
+--- a/src/OGLRender.h
++++ b/src/OGLRender.h
+@@ -104,8 +104,6 @@ protected:
+     bool m_bSupportFogCoordExt;
+     bool m_bMultiTexture;
+     bool m_bSupportClampToEdge;
+-    bool m_bClampS[2];
+-    bool m_bClampT[2];
+ 
+     GLuint  m_curBoundTex[8];
+     BOOL    m_texUnitEnabled[8];

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



More information about the Pkg-games-commits mailing list