From 9c841f8485b9be239bbd05b8d1a7c60757b06d37 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Mon, 2 Jul 2012 11:50:54 +0000 Subject: [PATCH] guarding against invalid files passed to 'pdoc' apple event, see #14384 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/carbon/app.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/osx/carbon/app.cpp b/src/osx/carbon/app.cpp index ab14fd4058..4f1417300e 100644 --- a/src/osx/carbon/app.cpp +++ b/src/osx/carbon/app.cpp @@ -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); -- 2.45.2