зеркало из https://github.com/mozilla/gecko-dev.git
Fix 103977: JSS calls non-portable snprintf
Replace snprintf() with PR_snprintf().
This commit is contained in:
Родитель
ff2557c067
Коммит
60357d9f1c
|
@ -576,7 +576,7 @@ Java_org_mozilla_jss_ssl_SSLSocket_setCipherPreference(
|
|||
status = SSL_CipherPrefSetDefault(cipher, enable);
|
||||
if(status != SECSuccess) {
|
||||
char buf[128];
|
||||
SNPRINTF(buf, 128, "Failed to %s cipher 0x%lx\n",
|
||||
PR_snprintf(buf, 128, "Failed to %s cipher 0x%lx\n",
|
||||
(enable ? "enable" : "disable"), cipher);
|
||||
JSS_throwMsgPrErr(env, SOCKET_EXCEPTION, buf);
|
||||
goto finish;
|
||||
|
|
|
@ -80,7 +80,7 @@ JSS_throwMsgPrErrArg(JNIEnv *env, char *throwableClassName, char *message,
|
|||
JSS_throw(env, OUT_OF_MEMORY_ERROR);
|
||||
goto finish;
|
||||
}
|
||||
SNPRINTF(msg, msgLen, "%s: (%d) %s", message, errCode, errStr);
|
||||
PR_snprintf(msg, msgLen, "%s: (%ld) %s", message, errCode, errStr);
|
||||
|
||||
JSS_throwMsg(env, throwableClassName, msg);
|
||||
|
||||
|
|
|
@ -278,12 +278,6 @@ JSS_throwMsgPrErrArg(JNIEnv *env, char *throwableClassName, char *message,
|
|||
#define JSS_throwMsgPrErr(e, cn, m) \
|
||||
JSS_throwMsgPrErrArg((e), (cn), (m), PR_GetError())
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#define SNPRINTF _snprintf
|
||||
#else
|
||||
#define SNPRINTF snprintf
|
||||
#endif
|
||||
|
||||
PR_END_EXTERN_C
|
||||
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче