6961123: setWMClass fails to null-terminate WM_CLASS string
authoromajid
Tue, 29 Dec 2015 10:40:43 -0500
changeset 35658 48bccfa61aef
parent 35657 5ee7a31d7923
child 35659 ae936857454f
6961123: setWMClass fails to null-terminate WM_CLASS string Reviewed-by: serb
jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseWindow.java
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseWindow.java	Tue Dec 29 16:46:11 2015 +0300
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseWindow.java	Tue Dec 29 10:40:43 2015 -0500
@@ -691,7 +691,7 @@
         XToolkit.awtLock();
         try {
             XAtom xa = XAtom.get(XAtom.XA_WM_CLASS);
-            xa.setProperty8(getWindow(), cl[0] + '\0' + cl[1]);
+            xa.setProperty8(getWindow(), cl[0] + '\0' + cl[1] + '\0');
         } finally {
             XToolkit.awtUnlock();
         }