]> git.saurik.com Git - wxWidgets.git/commitdiff
guarding against invalid files passed to 'odoc' apple event, see #14384
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 2 Jul 2012 11:47:29 +0000 (11:47 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 2 Jul 2012 11:47:29 +0000 (11:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/carbon/app.cpp

index 72602a844edfa072960ae2388824204e19919cc7..ab14fd40583b205007c780539d4421a7665ab246 100644 (file)
@@ -161,9 +161,13 @@ short wxApp::MacHandleAEODoc(const WXEVENTREF event, WXEVENTREF WXUNUSED(reply))
     wxArrayString fileNames;
     for (i = 1; i <= itemsInList; i++)
     {
-        AEGetNthPtr(
+        err = AEGetNthPtr(
             &docList, i, typeFSRef, &keywd, &returnedType,
             (Ptr)&theRef, sizeof(theRef), &actualSize);
+        
+        if ( err != noErr)
+            return err;
+        
         fName = wxMacFSRefToPath( &theRef ) ;
 
         fileNames.Add(fName);