mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8282978: Wrong parameter passed to GetStringXXXChars in various places
Reviewed-by: alanb, dfuchs
This commit is contained in:
parent
95ca94436d
commit
0fd09d383b
9 changed files with 22 additions and 22 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2022, 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
|
||||
|
@ -100,7 +100,7 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this,
|
|||
JNU_ThrowNullPointerException(env, "host argument is null");
|
||||
return NULL;
|
||||
}
|
||||
hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE);
|
||||
hostname = JNU_GetStringPlatformChars(env, host, NULL);
|
||||
CHECK_NULL_RETURN(hostname, NULL);
|
||||
|
||||
// try once, with our static buffer
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2022, 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
|
||||
|
@ -220,7 +220,7 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this,
|
|||
JNU_ThrowNullPointerException(env, "host argument is null");
|
||||
return NULL;
|
||||
}
|
||||
hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE);
|
||||
hostname = JNU_GetStringPlatformChars(env, host, NULL);
|
||||
CHECK_NULL_RETURN(hostname, NULL);
|
||||
|
||||
// try once, with our static buffer
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2022, 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
|
||||
|
@ -76,7 +76,7 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this,
|
|||
JNU_ThrowNullPointerException(env, "host argument is null");
|
||||
return NULL;
|
||||
}
|
||||
hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE);
|
||||
hostname = JNU_GetStringPlatformChars(env, host, NULL);
|
||||
CHECK_NULL_RETURN(hostname, NULL);
|
||||
|
||||
// try once, with our static buffer
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2022, 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
|
||||
|
@ -71,7 +71,7 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this,
|
|||
JNU_ThrowNullPointerException(env, "host argument is null");
|
||||
return NULL;
|
||||
}
|
||||
hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE);
|
||||
hostname = JNU_GetStringPlatformChars(env, host, NULL);
|
||||
CHECK_NULL_RETURN(hostname, NULL);
|
||||
|
||||
// try once, with our static buffer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue