From: chleun.moon Date: Tue, 12 Sep 2017 09:24:59 +0000 (+0900) Subject: [WGID-289372] Specify length in scanf X-Git-Tag: submit/tizen/20170913.024954^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=787b4dda42f554943039199bbd924ec600dc5452;p=platform%2Fcore%2Fapi%2Fvpn-setting.git [WGID-289372] Specify length in scanf Change-Id: I5b37dd95f610f9d2c7a577d631984d262b7e1f1e Signed-off-by: Cheoleun Moon --- diff --git a/test/vpn_test.c b/test/vpn_test.c index cebf075..32e4cfa 100755 --- a/test/vpn_test.c +++ b/test/vpn_test.c @@ -665,7 +665,7 @@ static char* __get_user_input(char *what) char *value = NULL; printf("Please ENTER %s:", what); - if (scanf(" %[^\n]s", buf) < 0) + if (scanf(" %127[^\n]s", buf) < 0) printf("Error in Reading the data to Buffer\n"); else value = g_strdup(buf);