[vlc-commits] macosx: fix crash when parsing incorrect debug logs

Felix Paul Kühne git at videolan.org
Tue Jul 2 23:14:32 CEST 2013


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Jul  2 23:13:27 2013 +0200| [29d00aef355dfc468e06dc35e7de0361e318f340] | committer: Felix Paul Kühne

macosx: fix crash when parsing incorrect debug logs

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=29d00aef355dfc468e06dc35e7de0361e318f340
---

 modules/gui/macosx/intf.m |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index bf9b1b1..f850f81 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -2013,6 +2013,11 @@ static VLCMain *_o_sharedMainInstance = nil;
             [o_msg_arr removeObjectAtIndex: 0];
             [o_msg_arr removeObjectAtIndex: 1];
         }
+        if (!item->psz_module)
+            return;
+        if (!str)
+            return;
+
         firstString = [NSString stringWithFormat:@"%s%s", item->psz_module, ppsz_type[i_type]];
         secondString = [NSString stringWithFormat:@"%@%s\n", firstString, str];
 



More information about the vlc-commits mailing list