[mupen64plus-video-rice] 13/191: Fix buffer overflow due to long strings from glGetString

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:17:10 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 91d32bc0c6828b373e98f8e9336701c5395e03b5
Author: Sven Eckelmann <sven.eckelmann at gmx.de>
Date:   Fri Mar 5 20:12:25 2010 +0100

    Fix buffer overflow due to long strings from glGetString
---
 debian/patches/long_glinfostring.patch | 31 +++++++++++++++++++++++++++++++
 debian/patches/series                  |  1 +
 2 files changed, 32 insertions(+)

diff --git a/debian/patches/long_glinfostring.patch b/debian/patches/long_glinfostring.patch
new file mode 100644
index 0000000..b12d49c
--- /dev/null
+++ b/debian/patches/long_glinfostring.patch
@@ -0,0 +1,31 @@
+Description: Fix buffer overflow due to long strings from glGetString
+origin: upstream, http://bitbucket.org/richard42/mupen64plus-video-rice/changeset/382f8fe748f3/
+Author: Richard Goedeken
+
+---
+diff --git a/src/GraphicsContext.h b/src/GraphicsContext.h
+index 0dfc78632910907e71cb66ccbb38a9ddf29cf1c3..38032b203c12e9a8508d59060e7b61ddef4cb4bd 100644
+--- a/src/GraphicsContext.h
++++ b/src/GraphicsContext.h
+@@ -89,7 +89,7 @@ protected:
+     bool                m_bWindowed;
+     RECT                m_rcWindowBounds;
+ 
+-    char                m_strDeviceStats[90];
++    char                m_strDeviceStats[256];
+ 
+     virtual ~CGraphicsContext();
+     CGraphicsContext();
+diff --git a/src/OGLGraphicsContext.cpp b/src/OGLGraphicsContext.cpp
+index e7cf982ec3d8faeb0243a47c9faadc9cfe927daa..f004fb52bf088b7866e9d1d1b9ee6d87faccb0d7 100644
+--- a/src/OGLGraphicsContext.cpp
++++ b/src/OGLGraphicsContext.cpp
+@@ -109,7 +109,7 @@ bool COGLGraphicsContext::Initialize(uint32 dwWidth, uint32 dwHeight, BOOL bWind
+ 
+     InitState();
+     InitOGLExtension();
+-    sprintf(m_strDeviceStats, "%s - %s : %s", m_pVendorStr, m_pRenderStr, m_pVersionStr);
++    sprintf(m_strDeviceStats, "%.60s - %.128s : %.60s", m_pVendorStr, m_pRenderStr, m_pVersionStr);
+     TRACE0(m_strDeviceStats);
+     DebugMessage(M64MSG_INFO, "Using OpenGL: %s", m_strDeviceStats);
+ 
diff --git a/debian/patches/series b/debian/patches/series
index e164d80..f271197 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 default-optimisations.patch
+long_glinfostring.patch

-- 
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