From 5fb178ee43fbc364b150fe6c6f0f79e8d8b0b179 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 4 Jun 2012 13:28:16 -0700 Subject: [PATCH] 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 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50621 Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=418161 Reviewed-by: Brian Paul Reviewed-by: Kenneth Graunke Cc: Markus Oehme --- src/glx/tests/fake_glx_screen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glx/tests/fake_glx_screen.h b/src/glx/tests/fake_glx_screen.h index 21515225971..6aa6cb68fe9 100644 --- a/src/glx/tests/fake_glx_screen.h +++ b/src/glx/tests/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); } -- 2.30.2