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

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


vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Jul  2 23:13:27 2013 +0200| [e5fdc86e7c53cd94814b2abb92e51199a4b9f6a0] | 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.0.git/?a=commit;h=e5fdc86e7c53cd94814b2abb92e51199a4b9f6a0
---

 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 448e738..a5bdff6 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -2158,6 +2158,11 @@ unsigned int CocoaKeyToVLC( unichar i_key )
             [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