changeset 53496:edc729e2ee36

8211810: X11 Time stamp data should be unsigned Reviewed-by: serb
author itakiguchi
date Tue, 30 Oct 2018 15:51:10 -0700
parents 6daafebf8189
children 755e08f972c3
files src/java.desktop/unix/classes/sun/awt/X11/XDnDDropTargetProtocol.java src/java.desktop/unix/classes/sun/awt/X11/XMSelection.java
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/unix/classes/sun/awt/X11/XDnDDropTargetProtocol.java	Tue Oct 30 17:06:32 2018 +0530
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XDnDDropTargetProtocol.java	Tue Oct 30 15:51:10 2018 -0700
@@ -620,7 +620,7 @@
 
         /* Time stamp - new in XDnD version 1. */
         if (sourceProtocolVersion > 0) {
-            time_stamp = xclient.get_data(3);
+            time_stamp = xclient.get_data(3) & 0xFFFFFFFFL;
         }
 
         /* User action - new in XDnD version 2. */
@@ -867,7 +867,7 @@
          */
         if (dropAction == DnDConstants.ACTION_MOVE && success) {
 
-            long time_stamp = xclient.get_data(2);
+            long time_stamp = xclient.get_data(2) & 0xFFFFFFFFL;
             long xdndSelectionAtom =
                 XDnDConstants.XDnDSelection.getSelectionAtom().getAtom();
 
--- a/src/java.desktop/unix/classes/sun/awt/X11/XMSelection.java	Tue Oct 30 17:06:32 2018 +0530
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XMSelection.java	Tue Oct 30 15:51:10 2018 -0700
@@ -200,7 +200,7 @@
             if (log.isLoggable(PlatformLogger.Level.FINE)) {
                 log.fine("client messags = " + xce);
             }
-            long timestamp = xce.get_data(0);
+            long timestamp = xce.get_data(0) & 0xFFFFFFFFL;
             long atom = xce.get_data(1);
             long owner = xce.get_data(2);
             long data = xce.get_data(3);