SUGGESTED FIX
src/windows/native/sun/net/www/protocol/http/NTLMAuthSequence.c
------- NTLMAuthSequence.c -------
42a43
> #include "jni_util.h"
120,122c121,123
< CHAR *pUser = 0;
< CHAR *pDomain = 0;
< CHAR *pPassword = 0;
---
> const CHAR *pUser = 0;
> const CHAR *pDomain = 0;
> const CHAR *pPassword = 0;
129c130,132
< pUser = (CHAR *)(*env)->GetStringUTFChars(env, user, &isCopy);
---
> pUser = JNU_GetStringPlatformChars(env, user, &isCopy);
> if (pUser == NULL)
> return 0; // pending Exception
132c135,140
< pDomain = (CHAR *)(*env)->GetStringUTFChars(env, domain, &isCopy);
---
> pDomain = JNU_GetStringPlatformChars(env, domain, &isCopy);
> if (pDomain == NULL) {
> if (pUser != NULL)
> JNU_ReleaseStringPlatformChars(env, user, pUser);
> return 0; // pending Exception
> }
135c143,150
< pPassword = (CHAR *)(*env)->GetStringUTFChars(env, password, &isCopy);
---
> pPassword = JNU_GetStringPlatformChars(env, password, &isCopy);
> if (pPassword == NULL) {
> if (pUser != NULL)
> JNU_ReleaseStringPlatformChars(env, user, pUser);
> if (pDomain != NULL)
> JNU_ReleaseStringPlatformChars(env, domain, pDomain);
> return 0; // pending Exception
> }
169a185,192
> /* Release resources held by JNU_GetStringPlatformChars */
> if (pUser != NULL)
> JNU_ReleaseStringPlatformChars(env, user, pUser);
> if (pPassword != NULL)
> JNU_ReleaseStringPlatformChars(env, password, pPassword);
> if (pDomain != NULL)
> JNU_ReleaseStringPlatformChars(env, domain, pDomain);
>
|