License version update and prevent issue resolved
[apps/native/ug-wifi-direct.git] / popup-wifidirect / src / wfd-app-popup-view.c
index 14ec90b..2dd5c97 100755 (executable)
@@ -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!");
        }