From 265d7c1604eb179a8fbae23695149eab5b8212c3 Mon Sep 17 00:00:00 2001 From: coderstory Date: Fri, 25 Dec 2020 00:04:28 +0800 Subject: [PATCH] fix #758 (cherry picked from commit 9cd1d03b33d07befeb94f4d6546111d782fa94d8) --- edxp-core/src/main/cpp/main/include/utils.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/edxp-core/src/main/cpp/main/include/utils.h b/edxp-core/src/main/cpp/main/include/utils.h index b758ee0f..393c344f 100644 --- a/edxp-core/src/main/cpp/main/include/utils.h +++ b/edxp-core/src/main/cpp/main/include/utils.h @@ -20,9 +20,8 @@ namespace edxp { } static inline std::string GetAndroidBrand() { - std::string prop_value; - prop_value.reserve(PROP_VALUE_MAX); - __system_property_get("ro.product.brand", prop_value.data()); + char prop_value[PROP_VALUE_MAX]; + __system_property_get("ro.product.brand", prop_value); return prop_value; }