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
This commit is contained in:
@@ -233,9 +233,13 @@ short wxApp::MacHandleAEPDoc(const WXEVENTREF event , WXEVENTREF WXUNUSED(reply)
|
|||||||
|
|
||||||
for (i = 1; i <= itemsInList; i++)
|
for (i = 1; i <= itemsInList; i++)
|
||||||
{
|
{
|
||||||
AEGetNthPtr(
|
err = AEGetNthPtr(
|
||||||
&docList, i, typeFSRef, &keywd, &returnedType,
|
&docList, i, typeFSRef, &keywd, &returnedType,
|
||||||
(Ptr)&theRef, sizeof(theRef), &actualSize);
|
(Ptr)&theRef, sizeof(theRef), &actualSize);
|
||||||
|
|
||||||
|
if ( err != noErr)
|
||||||
|
return err;
|
||||||
|
|
||||||
fName = wxMacFSRefToPath( &theRef ) ;
|
fName = wxMacFSRefToPath( &theRef ) ;
|
||||||
|
|
||||||
MacPrintFile(fName);
|
MacPrintFile(fName);
|
||||||
|
Reference in New Issue
Block a user