summaryrefslogtreecommitdiffstats
path: root/jni
diff options
context:
space:
mode:
authorMahesh Kumar Sharma <smahesh@codeaurora.org>2015-08-13 17:05:53 -0700
committerMahesh Kumar Sharma <smahesh@codeaurora.org>2015-08-14 17:12:32 -0700
commit256218b7e537546600beecd838f0ef2e7d8ec959 (patch)
tree749bad5050ddd6eb030eafcea47711fbd5025400 /jni
parentc0f0b37318e801161333c351fb4b94c0ca68e6f7 (diff)
downloadandroid_hardware_qcom_fm-256218b7e537546600beecd838f0ef2e7d8ec959.tar.gz
android_hardware_qcom_fm-256218b7e537546600beecd838f0ef2e7d8ec959.tar.bz2
android_hardware_qcom_fm-256218b7e537546600beecd838f0ef2e7d8ec959.zip
FM: Resolve KW issues.
Use more safe snprintf and thread safe strtok_r. Change-Id: I7ae8d94c7ab1e1c7e3b6a3b4b0dce703f9dcddce
Diffstat (limited to 'jni')
-rw-r--r--jni/android_hardware_fm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/jni/android_hardware_fm.cpp b/jni/android_hardware_fm.cpp
index b97c554..9eea048 100644
--- a/jni/android_hardware_fm.cpp
+++ b/jni/android_hardware_fm.cpp
@@ -108,7 +108,7 @@ static jint android_hardware_fmradio_FmReceiverJNI_acquireFdNative
if( err >= 0 ) {
ALOGD("Driver Version(Same as ChipId): %x \n", cap.version );
/*Conver the integer to string */
- sprintf(versionStr, "%d", cap.version );
+ snprintf(versionStr, sizeof(versionStr), "%d", cap.version);
property_set("hw.fm.version", versionStr);
} else {
return FM_JNI_FAILURE;