[MPlayer-cvslog] r36725 - trunk/sub/subreader.c
reimar
subversion at mplayerhq.hu
Sat Jan 25 17:54:55 CET 2014
Author: reimar
Date: Sat Jan 25 17:54:54 2014
New Revision: 36725
Log:
sub_fribidi: Make code more robust in error case.
Set freed pointers to NULL and number of lines to 0.
Modified:
trunk/sub/subreader.c
Modified: trunk/sub/subreader.c
==============================================================================
--- trunk/sub/subreader.c Sat Jan 25 17:54:53 2014 (r36724)
+++ trunk/sub/subreader.c Sat Jan 25 17:54:54 2014 (r36725)
@@ -1297,8 +1297,11 @@ static subtitle* sub_fribidi (subtitle *
}
}
if (!from && l){
- for (l = sub->lines; l;)
- free (sub->text[--l]);
+ for (l = sub->lines; l; --l) {
+ free (sub->text[l]);
+ sub->text[l] = NULL;
+ }
+ sub->lines = 0;
return ERR;
}
return sub;
More information about the MPlayer-cvslog
mailing list