X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=popup-wifidirect%2Fsrc%2Fwfd-app-popup-view.c;h=2dd5c9755a9dfc4bcba4da08963e64e54d202cec;hb=3636ad741c5ae281a1e1801bcbb1d60f233c411f;hp=14ec90b42e5021907ef8e101f31ab9e2fac2aed5;hpb=50b37d47bcbb3c7ad06faaa4ea9082917488a4fb;p=apps%2Fnative%2Fug-wifi-direct.git diff --git a/popup-wifidirect/src/wfd-app-popup-view.c b/popup-wifidirect/src/wfd-app-popup-view.c index 14ec90b..2dd5c97 100755 --- a/popup-wifidirect/src/wfd-app-popup-view.c +++ b/popup-wifidirect/src/wfd-app-popup-view.c @@ -1,13 +1,13 @@ /* * WiFi-Direct UG * -* Copyright 2012 Samsung Electronics Co., Ltd +* Copyright 2012-2013 Samsung Electronics Co., Ltd -* Licensed under the Flora License, Version 1.0 (the "License"); +* Licensed under the Flora License, Version 1.1 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at -* http://www.tizenopensource.org/license +* http://floralicense.org/license * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -128,6 +128,7 @@ static void __popup_resp_cb(void *data, Evas_Object * obj, void *event_info) } strncpy(ad->pin_number, pin, 64); + ad->pin_number[63] = '\0'; free(pin); pin = NULL; WDPOP_LOGD( "button ok: pin [%s]", ad->pin_number); @@ -377,7 +378,9 @@ static void _smart_ime_cb(void *data, Evas_Object * obj, void *event_info) const char *txt = elm_entry_markup_to_utf8(elm_entry_entry_get((const Evas_Object *) imf_context)); if (NULL != txt) { WDPOP_LOGD( "* text [%s], len=[%d]", txt, strlen(txt)); - strncpy(ad->pin_number, txt, sizeof(ad->pin_number)); + strncpy(ad->pin_number, txt, 64); + ad->pin_number[63] = '\0'; + free(txt); } else { WDPOP_LOGD( "Err!"); }