[MPlayer-cvslog] r25169 - trunk/playtreeparser.c
reimar
subversion at mplayerhq.hu
Mon Nov 26 21:35:27 CET 2007
Author: reimar
Date: Mon Nov 26 21:35:27 2007
New Revision: 25169
Log:
100l in play_tree_parser_get_line, check that there actually is
a previous character before comparing it against '\r'.
Fixes a possible crash on playlist file that is empty or starts with an empty line.
Modified:
trunk/playtreeparser.c
Modified: trunk/playtreeparser.c
==============================================================================
--- trunk/playtreeparser.c (original)
+++ trunk/playtreeparser.c Mon Nov 26 21:35:27 2007
@@ -93,7 +93,7 @@ play_tree_parser_get_line(play_tree_pars
break;
}
- line_end = ((*(end-1)) == '\r') ? end-1 : end;
+ line_end = (end > p->iter && *(end-1) == '\r') ? end-1 : end;
if(line_end - p->iter >= 0)
p->line = (char*)realloc(p->line,line_end - p->iter+1);
else
More information about the MPlayer-cvslog
mailing list