Prevent issue [CID 370888] fixed
authorSung-jae Park <nicesj.park@samsung.com>
Mon, 20 Apr 2015 09:54:34 +0000 (18:54 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Mon, 20 Apr 2015 09:54:34 +0000 (18:54 +0900)
[model] Redwood,Kiran,B3(Wearable)
[binary_type] AP
[customer] Docomo/Orange/ATT/Open
[issue#] N/A
[problem]
[cause]
[solution]
[team] HomeTF
[request]
[horizontal_expansion]

Change-Id: I914985eed30f812e7bcc067936e5cfadfa6d24db

src/buffer_handler.c

index eadb4af..a6d9bb2 100644 (file)
@@ -1233,7 +1233,15 @@ EAPI void buffer_handler_flush(struct buffer_info *info)
                        }
                }
        } else if (buffer->type == WIDGET_FB_TYPE_FILE) {
-               fd = open(widget_util_uri_to_path(info->id), O_WRONLY | O_CREAT, 0644);
+               const char *path;
+
+               path = widget_util_uri_to_path(info->id);
+               if (!path) {
+                       ErrPrint("Invalid id: [%s]\n", info->id);
+                       return;
+               }
+
+               fd = open(path, O_WRONLY | O_CREAT, 0644);
                if (fd < 0) {
                        ErrPrint("%s open: %d\n", widget_util_uri_to_path(info->id), errno);
                        return;