From 84d72665a5e8c6db9acca44dd3bcdf2c784451fb Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Fri, 25 Apr 2003 22:27:35 +0000 Subject: avoid segfault with subtitle WITHOUT path. CVS patchset: 4679 CVS date: 2003/04/25 22:27:35 --- src/xine-engine/xine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 373541243..c4ec29622 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.245 2003/04/23 14:33:05 miguelfreitas Exp $ + * $Id: xine.c,v 1.246 2003/04/25 22:27:35 f1rmb Exp $ * * top-level xine functions * @@ -738,7 +738,7 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) { memcpy(subtitle_mrl, tmp, stream_setup - tmp); subtitle_mrl[stream_setup - tmp] = '\0'; } else { - subtitle_mrl = (char *)malloc(strlen(tmp)); + subtitle_mrl = (char *)malloc(strlen(tmp) + 1); memcpy(subtitle_mrl, tmp, strlen(tmp)); subtitle_mrl[strlen(tmp)] = '\0'; } -- cgit v1.2.3