ecore_evas_extn: fix crashing while create temp file 25/53725/1 accepted/tizen/mobile/20151210.030202 accepted/tizen/tv/20151210.021236 accepted/tizen/wearable/20151210.023905 submit/tizen/20151209.053607
authorThiep Ha <thiep.ha@samsung.com>
Wed, 9 Dec 2015 02:51:06 +0000 (11:51 +0900)
committerThiep Ha <thiep.ha@samsung.com>
Wed, 9 Dec 2015 02:53:14 +0000 (11:53 +0900)
The temp file template of mkstemp is constant string.
This makes mkstemp crash. We change it to string array to fix it.

@tizen_fix

Change-Id: Ib586ca0f227d75808ed25dd24221f4ffe181adef

src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c

index b210e4e..5e0b4f7 100644 (file)
@@ -51,7 +51,8 @@ _extnbuf_new(const char *base, int id, Eina_Bool sys, int num,
      {
         //TIZEN ONLY (150908): security issue. To access any application, it needs smack rule.
         //b->lockfd = eina_file_mkstemp("ee-lock-XXXXXX", &tmp);
-        b->lockfd = mkstemp("/run/.efl/ee-lock-XXXXXX");
+        char file[] = "/run/.efl/ee-lock-XXXXXX";
+        b->lockfd = mkstemp(file);
         //
         if (b->lockfd < 0) goto err;
         b->lock = eina_stringshare_add(file);