68. Fix the GLLibraryVersion string allocation to accomodate for the

terminating \0 character which would otherwise corrupt the malloc heap
    (Bugzilla 385, John Dennis).
This commit is contained in:
Egbert Eich 2004-03-30 17:35:32 +00:00
parent 64f5c2feae
commit cbf1017a88

View file

@ -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;
}