[TIZENIOT-2074] fix crash issue for share feature 51/246451/1 submit/tizen/20201029.115430
authoraman.jeph <aman.jeph@samsung.com>
Thu, 29 Oct 2020 11:21:51 +0000 (16:51 +0530)
committeraman.jeph <aman.jeph@samsung.com>
Thu, 29 Oct 2020 11:21:51 +0000 (16:51 +0530)
Change-Id: Ic0438d590987c07a45736fb587cd4e1da51efeb8
Signed-off-by: aman.jeph <aman.jeph@samsung.com>
src/view/mp-video-list-share-via-view.c

index 16b5883dd9f9f64de4ec79254102a738ab7655f2..c8b3a870fa19c79f1bd1dec2ad45ce54a1f6af75 100755 (executable)
@@ -372,8 +372,14 @@ void mp_share_view_launching_share_panel(void)
                szFileUrlArrayForServiceExtraData =
                        (char **) calloc(nExtraDataSize, sizeof(char *));
 
-               /* Store the list so the share panel can be updated later */
-               g_pShareList = (char **) calloc(nExtraDataSize, sizeof(char *));
+               /** Store the list so the share panel can be updated later
+                *  g_pShareList size needs to bigger than total video size
+                *  because first url will be added twice, one for signal share and
+                *  one for multiple share.
+                *  so g_pShareList alloc size = nExtraDataSize + 1
+                */
+
+               g_pShareList = (char **) calloc((nExtraDataSize + 1), sizeof(char *));
        }
 
        /* Extract First URI. */