changeset 48255:971d83666b23

8170495: JNI primitive type mismatch in SocketDispatcher.c:187 Summary: Cast DWORD 'written' to a jint before adding to 'count' Reviewed-by: alanb, rriggs
author bpb
date Tue, 12 Dec 2017 15:43:48 -0800
parents 111104f1e033
children 472f74fb6c6b
files src/java.base/windows/native/libnio/ch/SocketDispatcher.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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));