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

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


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

macosx: fix crash when parsing incorrect debug logs
(cherry picked from commit 29d00aef355dfc468e06dc35e7de0361e318f340)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=8c5aa19feec639564003cba5bcaffb46ac1c9c8b
---

 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