diff options
author | Radoslaw Czerski <r.czerski@samsung.com> | 2016-04-12 17:33:54 +0200 |
---|---|---|
committer | Radoslaw Czerski <r.czerski@samsung.com> | 2016-04-12 17:33:54 +0200 |
commit | bb0089dcaecdd90dfee4493fe91386f843593809 (patch) | |
tree | 325ec37c0eb2b478a1bc6fccac49e1b13826a741 | |
parent | d221f284155b2dd353dcf33876bc9396c09bec1c (diff) | |
download | indicator-win-bb0089dcaecdd90dfee4493fe91386f843593809.tar.gz indicator-win-bb0089dcaecdd90dfee4493fe91386f843593809.tar.bz2 indicator-win-bb0089dcaecdd90dfee4493fe91386f843593809.zip |
main: Use of vulnerable function fixed.
sprintf -> snprintf
Change-Id: Iaaa2ae7da5d78f9500af57d82a032c3603355800
Signed-off-by: Radoslaw Czerski <r.czerski@samsung.com>
-rw-r--r-- | src/main.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -136,6 +136,7 @@ static void _indicator_window_delete_cb(void *data, Evas_Object * obj, void *eve _terminate_indicator((struct appdata *)data); } +#define SIGNAL_NAME_LEN 30 static void _indicator_notify_pm_state_cb(device_callback_e type, void *value, void *user_data) { static int nMove = 0; @@ -163,9 +164,10 @@ static void _indicator_notify_pm_state_cb(device_callback_e type, void *value, v else if(nMove<=0) nIndex = 1; { - char temp[30] = {0,}; - sprintf(temp,"indicator.padding.resize.%d",nMove); - util_signal_emit(user_data,temp,"indicator.prog"); + char signal_to_emit[SIGNAL_NAME_LEN] = {0,}; + + snprintf(signal_to_emit, SIGNAL_NAME_LEN, "indicator.padding.resize.%d", nMove); + util_signal_emit(user_data, signal_to_emit, "indicator.prog"); } icon_set_update_flag(0); box_noti_ani_handle(0); |