From: aman.jeph Date: Thu, 29 Oct 2020 11:21:51 +0000 (+0530) Subject: [TIZENIOT-2074] fix crash issue for share feature X-Git-Tag: submit/tizen/20201029.115430^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=57a4ed4b5b412eb61231563990541d0c951439af;p=profile%2Fiot%2Fapps%2Fnative%2Fvideo-player.git [TIZENIOT-2074] fix crash issue for share feature Change-Id: Ic0438d590987c07a45736fb587cd4e1da51efeb8 Signed-off-by: aman.jeph --- diff --git a/src/view/mp-video-list-share-via-view.c b/src/view/mp-video-list-share-via-view.c index 16b5883..c8b3a87 100755 --- a/src/view/mp-video-list-share-via-view.c +++ b/src/view/mp-video-list-share-via-view.c @@ -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. */