Check input of isNumericAddress

This commit is contained in:
M66B 2022-04-13 20:37:59 +02:00
parent a1636b849a
commit 4917301379
2 changed files with 4 additions and 1 deletions

View File

@ -533,6 +533,9 @@ public class ConnectionHelper {
}
static boolean isNumericAddress(String host) {
// IPv4-mapped IPv6 can be 45 characters
if (host == null || host.length() > 64)
return false;
return ConnectionHelper.jni_is_numeric_address(host);
}

View File

@ -13,7 +13,7 @@
void log_android(int prio, const char *fmt, ...) {
if (prio >= ANDROID_LOG_DEBUG) {
char line[4096];
char line[1024];
va_list argptr;
va_start(argptr, fmt);
vsprintf(line, fmt, argptr);