Skip to content

Commit 7ce5bd1

Browse files
author
Man Cao
committedSep 19, 2023
8316468: os::write incorrectly handles partial write
Reviewed-by: dholmes, shade
1 parent d19e017 commit 7ce5bd1

File tree

1 file changed

+1
-1
lines changed
  • src/hotspot/share/runtime

1 file changed

+1
-1
lines changed
 

‎src/hotspot/share/runtime/os.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,7 @@ bool os::write(int fd, const void *buf, size_t nBytes) {
14391439
if (res == OS_ERR) {
14401440
return false;
14411441
}
1442-
buf = (void *)((char *)buf + nBytes);
1442+
buf = (void *)((char *)buf + res);
14431443
nBytes -= res;
14441444
}
14451445

0 commit comments

Comments
 (0)