Index: /trunk/src/VBox/Additions/common/crOpenGL/wgl.c
===================================================================
--- /trunk/src/VBox/Additions/common/crOpenGL/wgl.c	(revision 55621)
+++ /trunk/src/VBox/Additions/common/crOpenGL/wgl.c	(revision 55622)
@@ -8,4 +8,5 @@
 #include "cr_spu.h"
 #include "cr_environment.h"
+#include "cr_mem.h"
 #include "stub.h"
 
@@ -354,5 +355,5 @@
 DECLEXPORT(HGLRC) WINAPI VBoxCreateContext( HDC hdc, struct VBOXUHGSMI *pHgsmi )
 {
-    char dpyName[MAX_DPY_NAME];
+    char *dpyName;
     ContextInfo *context;
 
@@ -363,5 +364,10 @@
     CRASSERT(stub.contextTable);
 
-    sprintf(dpyName, "%d", hdc);
+    dpyName = crCalloc(MAX_DPY_NAME);
+    if (dpyName)
+    {
+        crMemset(dpyName, 0, MAX_DPY_NAME);
+        sprintf(dpyName, "%d", hdc);
+    }
 #ifndef VBOX_CROGL_USE_VBITS_SUPERSET
     if (stub.haveNativeOpenGL)
@@ -376,4 +382,7 @@
 #endif
             );
+    /* Not needed any more. */
+    crFree(dpyName);
+
     if (!context)
         return 0;
