diff options
author | Kyuho Jo <kyuho.jo@samsung.com> | 2016-05-09 17:11:53 +0900 |
---|---|---|
committer | Kyuho Jo <kyuho.jo@samsung.com> | 2016-05-09 19:21:36 +0900 |
commit | 3997e7ccd77e244fd3868f58ad815c1341ff6d0e (patch) | |
tree | dc59212ef66a3b814aeabebd88045b197e766c96 | |
parent | 9e5f7db16509ace6ec5f3939486a9cbb1a69c135 (diff) | |
download | air_infosquare-3997e7ccd77e244fd3868f58ad815c1341ff6d0e.tar.gz air_infosquare-3997e7ccd77e244fd3868f58ad815c1341ff6d0e.tar.bz2 air_infosquare-3997e7ccd77e244fd3868f58ad815c1341ff6d0e.zip |
Fixed a defect from svace.
Change-Id: I6fbb73219d537c592c3155153af0da7b1eb6dfe2
Signed-off-by: Kyuho Jo <kyuho.jo@samsung.com>
-rwxr-xr-x | src/util.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -117,7 +117,7 @@ Evas_Object *util_show_notification_popup( char *start_tag = "<font=BreezeSans:style=Light color=#686868 align=left linesize=46 font_size=32>"; char *end_tag = "</font>"; - Evas_Object *notification_popup; + Evas_Object *notification_popup = NULL; Evas_Object *window_layout = NULL; Evas_Object *up_btn, *down_btn, *ok_btn; Evas_Object *scroller, *scroller_label; @@ -130,9 +130,19 @@ Evas_Object *util_show_notification_popup( notification_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, &title); notification_get_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT, &temp_content); + if (temp_content == NULL) { + _ERR("temp_content is null"); + goto out; + } + int buffer_size = strlen(start_tag)+strlen(temp_content)+strlen(end_tag); content = (char *)calloc(buffer_size+1, sizeof(char)); + + if (content == NULL) { + _ERR("allocation for content failed"); + goto out; + } snprintf(content, buffer_size, "%s%s%s", start_tag, temp_content, end_tag); /* Creating a Notification Window */ |