diff options
author | Zheng BaoZhong <bao-zhong@motorola.com> | 2009-10-10 08:07:44 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2009-10-10 16:26:33 -0400 |
commit | 038e315cded93edff840cfe108fdb3c47a525d7e (patch) | |
tree | f08fdb7728fedf6e70052f13970df6e3056487c5 /core/jni/android_net_wifi_Wifi.cpp | |
parent | a5e44bbd3788bae2b38dfb7771cb021f8541fe1f (diff) | |
download | frameworks_base-038e315cded93edff840cfe108fdb3c47a525d7e.zip frameworks_base-038e315cded93edff840cfe108fdb3c47a525d7e.tar.gz frameworks_base-038e315cded93edff840cfe108fdb3c47a525d7e.tar.bz2 |
Wifi: Fix runtime crash in when scan results contain KSC 5601 SSID
bug b/2178462
Change-Id: I409d9b4a163299c3383ec092cd2368a9d24236cb
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'core/jni/android_net_wifi_Wifi.cpp')
-rw-r--r-- | core/jni/android_net_wifi_Wifi.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/jni/android_net_wifi_Wifi.cpp b/core/jni/android_net_wifi_Wifi.cpp index 38f3fda..46000c9 100644 --- a/core/jni/android_net_wifi_Wifi.cpp +++ b/core/jni/android_net_wifi_Wifi.cpp @@ -20,6 +20,7 @@ #include <utils/misc.h> #include <android_runtime/AndroidRuntime.h> #include <utils/Log.h> +#include <utils/String16.h> #include "wifi.h" @@ -92,7 +93,8 @@ static jstring doStringCommand(JNIEnv *env, const char *cmd) if (doCommand(cmd, reply, sizeof(reply)) != 0) { return env->NewStringUTF(NULL); } else { - return env->NewStringUTF(reply); + String16 str((char *)reply); + return env->NewString((const jchar *)str.string(), str.size()); } } |