summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2004-03-30 17:35:32 +0000
committerEgbert Eich <eich@suse.de>2004-03-30 17:35:32 +0000
commitcbf1017a8870a8194e67f7fd9ffffab18cbc270b (patch)
tree9aaf68a9cb7a153c7efb39101eb37ee53c2ec8cb
parent64f5c2feae64186811a9612ee164c2e36e2fdc7a (diff)
68. Fix the GLLibraryVersion string allocation to accomodate for the
terminating \0 character which would otherwise corrupt the malloc heap (Bugzilla 385, John Dennis).
-rw-r--r--GL/glx/single2.c2
1 files changed, 1 insertions, 1 deletions
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;
}