diff --git a/app/src/main/java/eu/faircode/email/ConnectionHelper.java b/app/src/main/java/eu/faircode/email/ConnectionHelper.java index e4c16c0dbd..02cc930afd 100644 --- a/app/src/main/java/eu/faircode/email/ConnectionHelper.java +++ b/app/src/main/java/eu/faircode/email/ConnectionHelper.java @@ -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); } diff --git a/app/src/main/jni/fairemail.cc b/app/src/main/jni/fairemail.cc index 46377d8c26..9af3ec9d26 100644 --- a/app/src/main/jni/fairemail.cc +++ b/app/src/main/jni/fairemail.cc @@ -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);