From cbf1017a8870a8194e67f7fd9ffffab18cbc270b Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Tue, 30 Mar 2004 17:35:32 +0000 Subject: [PATCH] 68. Fix the GLLibraryVersion string allocation to accomodate for the terminating \0 character which would otherwise corrupt the malloc heap (Bugzilla 385, John Dennis). --- GL/glx/single2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GL/glx/single2.c b/GL/glx/single2.c index c757d60bd..5869e8f50 100644 --- a/GL/glx/single2.c +++ b/GL/glx/single2.c @@ -344,7 +344,7 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap) if ( atof( string ) > atof( GLServerVersion ) ) { buf = __glXMalloc( __glXStrlen( string ) + __glXStrlen( GLServerVersion ) - + 3 ); + + 4 ); if ( buf == NULL ) { string = GLServerVersion; }