[Mesa-dev] [PATCH] glx/tests: Fix off-by-one error in allocating extension string buffer
Brian Paul
brian.e.paul at gmail.com
Fri Jun 29 14:40:52 PDT 2012
On Fri, Jun 29, 2012 at 2:58 PM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> NOTE: This is a candidate for the 8.0 release branch.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50621
> Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=418161
> Cc: Markus Oehme <oehme.markus at gmx.de>
> ---
> src/glx/tests/fake_glx_screen.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/glx/tests/fake_glx_screen.h b/src/glx/tests/fake_glx_screen.h
> index 2151522..6aa6cb6 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);
> }
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list