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

src/osx/carbon/app.cpp

index ab14fd40583b205007c780539d4421a7665ab246..4f1417300e179bb9170d6bd959ce0d205eaf1cbc 100644 (file)
@@ -233,9 +233,13 @@ short wxApp::MacHandleAEPDoc(const WXEVENTREF event , WXEVENTREF WXUNUSED(reply)
 
     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 ) ;
 
         MacPrintFile(fName);