From 46447f7cfd966da458e83f33b6205a89196fe598 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Tue, 5 Nov 2019 01:46:46 -0500 Subject: [PATCH] Proper string buffer size --- native/jni/su/connect.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/native/jni/su/connect.cpp b/native/jni/su/connect.cpp index a5789f45d..501f6020c 100644 --- a/native/jni/su/connect.cpp +++ b/native/jni/su/connect.cpp @@ -73,10 +73,10 @@ ex(fromUid), ex(toUid), ex(pid), ex(policy), \ ex(command.data()), ex(notify) void app_log(const su_context &ctx) { - char fromUid[16]; + char fromUid[32]; sprintf(fromUid, "from.uid:i:%d", get_uid(ctx.info)); - char toUid[16]; + char toUid[32]; sprintf(toUid, "to.uid:i:%d", ctx.req.uid); char pid[16]; @@ -98,7 +98,7 @@ void app_log(const su_context &ctx) { "notify", ex(fromUid), ex(policy) void app_notify(const su_context &ctx) { - char fromUid[16]; + char fromUid[32]; sprintf(fromUid, "from.uid:i:%d", get_uid(ctx.info)); char policy[16];