jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c
changeset 24363 33b869a8806b
parent 23589 05e692d15fcd
--- a/jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c	Fri May 09 09:47:07 2014 +0100
+++ b/jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c	Fri May 09 12:06:13 2014 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -200,14 +200,14 @@
         len = remaining;
     }
 
-    RESTARTABLE(read(fd, buf+off, len), n);
+    RESTARTABLE(read(fd, buf, len), n);
     if (n == -1) {
         JNU_ThrowIOExceptionWithLastError(env, "read");
     } else {
         if (n == 0) {
             n = -1;     // EOF
         } else {
-            (*env)->SetByteArrayRegion(env, ba, off, (jint)n, (jbyte *)(buf+off));
+            (*env)->SetByteArrayRegion(env, ba, off, (jint)n, (jbyte *)(buf));
         }
     }
     return n;