Correct buffer size limitation for DnsResolver API

Bug: 131055651
Test: atest DnsResolverTest
(cherry picked from commit f6726c2c5456887aaebe3f821a86a83bbed92f3d)

Change-Id: I69ad9428ddfb70437e47ef4740930a97aece69d9
This commit is contained in:
Luke Huang
2019-05-02 01:54:50 -07:00
parent 44bb6d00a7
commit 53578de5d1

View File

@@ -49,8 +49,8 @@ int ifc_disable(const char *ifname);
namespace android {
constexpr int MAXPACKETSIZE = 8 * 1024;
// FrameworkListener limits the size of commands to 1024 bytes. TODO: fix this.
constexpr int MAXCMDSIZE = 1024;
// FrameworkListener limits the size of commands to 4096 bytes.
constexpr int MAXCMDSIZE = 4096;
static void throwErrnoException(JNIEnv* env, const char* functionName, int error) {
ScopedLocalRef<jstring> detailMessage(env, env->NewStringUTF(functionName));