8170495: JNI primitive type mismatch in SocketDispatcher.c:187
Summary: Cast DWORD 'written' to a jint before adding to 'count'
Reviewed-by: alanb, rriggs
--- a/src/java.base/windows/native/libnio/ch/SocketDispatcher.c Tue Dec 12 14:16:24 2017 -0800
+++ b/src/java.base/windows/native/libnio/ch/SocketDispatcher.c Tue Dec 12 15:43:48 2017 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, 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
@@ -179,7 +179,7 @@
}
}
- count += written;
+ count += (jint)written;
address += written;
} while ((count < total) && (written == MAX_BUFFER_SIZE));