[MPlayer-cvslog] r28218 - trunk/playtreeparser.c
reimar
subversion at mplayerhq.hu
Thu Jan 1 10:37:02 CET 2009
Author: reimar
Date: Thu Jan 1 10:37:02 2009
New Revision: 28218
Log:
Add zero termination missing in two cases.
Modified:
trunk/playtreeparser.c
Modified: trunk/playtreeparser.c
==============================================================================
--- trunk/playtreeparser.c Thu Jan 1 10:35:25 2009 (r28217)
+++ trunk/playtreeparser.c Thu Jan 1 10:37:02 2009 (r28218)
@@ -53,6 +53,7 @@ play_tree_parser_get_line(play_tree_pars
if(p->buffer == NULL) {
p->buffer = malloc(BUF_STEP);
p->buffer_size = BUF_STEP;
+ p->buffer[0] = 0;
p->iter = p->buffer;
}
@@ -110,9 +111,9 @@ play_tree_parser_get_line(play_tree_pars
if(end[0] != '\0') {
p->buffer_end -= end-p->iter;
memmove(p->buffer,end,p->buffer_end);
- p->buffer[p->buffer_end] = '\0';
} else
p->buffer_end = 0;
+ p->buffer[p->buffer_end] = '\0';
p->iter = p->buffer;
} else
p->iter = end;
More information about the MPlayer-cvslog
mailing list