[MPlayer-cvslog] r35376 - trunk/libmenu/menu_chapsel.c
reimar
subversion at mplayerhq.hu
Sat Nov 10 12:49:37 CET 2012
Author: reimar
Date: Sat Nov 10 12:49:37 2012
New Revision: 35376
Log:
Fix allocation that could in theory be too small for the terminating NULL.
It should only have been possible to actually trigger when chapter
name and start string were both empty.
Modified:
trunk/libmenu/menu_chapsel.c
Modified: trunk/libmenu/menu_chapsel.c
==============================================================================
--- trunk/libmenu/menu_chapsel.c Sat Nov 10 11:56:36 2012 (r35375)
+++ trunk/libmenu/menu_chapsel.c Sat Nov 10 12:49:37 2012 (r35376)
@@ -76,7 +76,7 @@ static char *fmt_replace(const char *fmt
int l = strlen(fmt);
int cl = strlen(chapter_name);
int sl = strlen(start);
- char *str = malloc(l + cl + sl);
+ char *str = malloc(l + cl + sl + 1);
char *p;
strcpy(str, fmt);
p = strstr(str, ctag);
More information about the MPlayer-cvslog
mailing list