[vlc-commits] macosx: fix use after free for video effects string
David Fuhrmann
git at videolan.org
Fri Nov 15 17:58:46 CET 2013
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Thu Nov 14 13:11:29 2013 +0100| [31b1205fd622eef0be3379f602cf83807c3c2124] | committer: David Fuhrmann
macosx: fix use after free for video effects string
This bug resulted in failure of setting more than one video effect
filter on mavericks.
close #9849
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=31b1205fd622eef0be3379f602cf83807c3c2124
---
modules/gui/macosx/VideoEffects.m | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/gui/macosx/VideoEffects.m b/modules/gui/macosx/VideoEffects.m
index 838e4c0..6f413cb 100644
--- a/modules/gui/macosx/VideoEffects.m
+++ b/modules/gui/macosx/VideoEffects.m
@@ -524,8 +524,9 @@ static VLCVideoEffects *_o_sharedInstance = nil;
free(psz_string);
psz_string = strdup(psz_name);
} else if (strstr(psz_string, psz_name) == NULL) {
+ char *psz_tmp = strdup([[NSString stringWithFormat: @"%s:%s", psz_string, psz_name] UTF8String]);
free(psz_string);
- psz_string = strdup([[NSString stringWithFormat: @"%s:%s", psz_string, psz_name] UTF8String]);
+ psz_string = psz_tmp;
}
} else {
if (!psz_string)
More information about the vlc-commits
mailing list