From: Stefan Csomor Date: Mon, 2 Jul 2012 11:47:29 +0000 (+0000) Subject: guarding against invalid files passed to 'odoc' apple event, see #14384 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0161592b2528be55fcd9d02aced2de5d89c6975f guarding against invalid files passed to 'odoc' apple event, see #14384 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/carbon/app.cpp b/src/osx/carbon/app.cpp index 72602a844e..ab14fd4058 100644 --- a/src/osx/carbon/app.cpp +++ b/src/osx/carbon/app.cpp @@ -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);