summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2012-06-04 13:28:16 -0700
committerIan Romanick <ian.d.romanick@intel.com>2012-07-03 12:39:22 -0700
commit313d48a11006646ea0beb2f39b3233e3cc17eb35 (patch)
tree1dc18d3bce908d6e6a5555d27878026ef4a8f2ac
parent076805c9c2de2436782aa111e09d09e34a5d3f7c (diff)
downloadmesa-313d48a11006646ea0beb2f39b3233e3cc17eb35.tar.gz
glx/tests: Fix off-by-one error in allocating extension string buffer
NOTE: This is a candidate for the 8.0 release branch. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50621 Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=418161 Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: Markus Oehme <oehme.markus@gmx.de> (cherry picked from commit 5fb178ee43fbc364b150fe6c6f0f79e8d8b0b179)
-rw-r--r--tests/glx/fake_glx_screen.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/glx/fake_glx_screen.h b/tests/glx/fake_glx_screen.h
index 21515225971..6aa6cb68fe9 100644
--- a/tests/glx/fake_glx_screen.h
+++ b/tests/glx/fake_glx_screen.h
@@ -40,7 +40,7 @@ public:
this->display = glx_dpy;
this->dpy = (glx_dpy != NULL) ? glx_dpy->dpy : NULL;
- this->serverGLXexts = new char[strlen(ext)];
+ this->serverGLXexts = new char[strlen(ext) + 1];
strcpy((char *) this->serverGLXexts, ext);
}