diff options
author | Nick Kralevich <nnk@google.com> | 2013-10-09 17:24:40 -0700 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2013-10-09 23:19:27 -0700 |
commit | 9fc27663273414cee93f5219d48a28fe84b0bb7e (patch) | |
tree | 14750d30f4b5a86f8e0c6c3efc5cd500293b3188 | |
parent | b2b95168dce5a0330ffb5ae962db49b1697e92f7 (diff) | |
download | wpan-kitkat-cts-dev.tar.gz |
Fix compile error with FORTIFY_SOURCEandroid-sdk-4.4.2_r1.0.1android-sdk-4.4.2_r1android-cts-4.4_r4android-cts-4.4_r1android-4.4_r1.2.0.1android-4.4_r1.2android-4.4_r1.1.0.1android-4.4_r1.1android-4.4_r1.0.1android-4.4_r1android-4.4_r0.9android-4.4.4_r2.0.1android-4.4.4_r2android-4.4.4_r1.0.1android-4.4.4_r1android-4.4.3_r1.1.0.1android-4.4.3_r1.1android-4.4.3_r1.0.1android-4.4.3_r1android-4.4.2_r2.0.1android-4.4.2_r2android-4.4.2_r1.0.1android-4.4.2_r1android-4.4.1_r1.0.1android-4.4.1_r1kitkat-releasekitkat-mr2.2-releasekitkat-mr2.1-releasekitkat-mr2-releasekitkat-mr1.1-releasekitkat-mr1-releasekitkat-devkitkat-cts-releasekitkat-cts-dev
You're gonna have a bad day if you attempt to read 3 bytes
into 1 byte.
(cherry picked from commit b4f59474493a0793375e723edbd0d29e55a8c581)
Change-Id: I6beea5631f30f4aa04ebbed10207f399187bf218
-rw-r--r-- | tools/kfmapp/kfmapp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/kfmapp/kfmapp.c b/tools/kfmapp/kfmapp.c index d35a64f..1f2b923 100644 --- a/tools/kfmapp/kfmapp.c +++ b/tools/kfmapp/kfmapp.c @@ -731,7 +731,7 @@ exit: int fmapp_get_rx_rssi_threshold(void) { - unsigned char fm_rssi_threshhold; + unsigned char fm_rssi_threshhold[4]; int fd, res; fd = open(FMRX_RSSI_LVL_SYSFS_ENTRY, O_RDONLY); @@ -746,6 +746,7 @@ int fmapp_get_rx_rssi_threshold(void) FMRX_RSSI_LVL_SYSFS_ENTRY,strerror(res)); goto exit; } + fm_rssi_threshhold[3] = '\0'; printf("Current FM RSSI threshold level is %d \n", atoi((char *) &fm_rssi_threshhold)); |