Installer.app (#26)

14 views
Skip to first unread message

Landon Fuller

unread,
Jan 28, 2007, 12:37:45 AM1/28/07
to moab...@googlegroups.com
Same bug, different software.

Annotated disassembly follows. Of interest:

A controller is instantiated here, returns failure (can't open the
file): 0x00003d91 +221

The failure is detected, and the code jumps here, to set up the
dialog: 0x00003fbf +779

For the patch, I'm thinking either:
- Patch localizedStringForKey:value:table:, returning a localized
string that will not include the file's path (ie, omit %@)
or
- Context-patch NSRunAlertPanel while in -[InstallerController
openFile:withOptions:, escaping % in the msg argument.

-landonf


Dump of assembler code for function -[InstallerController
openFile:withOptions:]:
0x00003cb4 <-[InstallerController openFile:withOptions:]+0>:
push %ebp
0x00003cb5 <-[InstallerController openFile:withOptions:]+1>:
mov %esp,%ebp
0x00003cb7 <-[InstallerController openFile:withOptions:]+3>:
push %edi
0x00003cb8 <-[InstallerController openFile:withOptions:]+4>:
push %esi
0x00003cb9 <-[InstallerController openFile:withOptions:]+5>:
push %ebx
0x00003cba <-[InstallerController openFile:withOptions:]+6>:
sub $0x3c,%esp
0x00003cbd <-[InstallerController openFile:withOptions:]+9>:
mov 16(%ebp),%edi <-- file path
0x00003cc0 <-[InstallerController openFile:withOptions:]+12>:
movl $0x0,-28(%ebp)
0x00003cc7 <-[InstallerController openFile:withOptions:]+19>:
mov 8(%ebp),%eax
0x00003cca <-[InstallerController openFile:withOptions:]+22>:
movb $0x1,28(%eax)
0x00003cce <-[InstallerController openFile:withOptions:]+26>:
mov 20(%eax),%edx <-- options for "withOptions"
0x00003cd1 <-[InstallerController openFile:withOptions:]+29>:
mov 0x34fd8,%eax <-- arg2, "objectEnumerator"
0x00003cd6 <-[InstallerController openFile:withOptions:]+34>:
mov %eax,4(%esp)
0x00003cda <-[InstallerController openFile:withOptions:]+38>:
mov %edx,(%esp) <-- arg1, NSArray instance (empty?)
0x00003cdd <-[InstallerController openFile:withOptions:]+41>:
call 0x330e5 <dyld_stub_objc_msgSend> <-- -[NSArray objectEnumerator]
0x00003ce2 <-[InstallerController openFile:withOptions:]+46>:
mov %eax,%esi
0x00003ce4 <-[InstallerController openFile:withOptions:]+48>:
mov 0x34fcc,%eax <-- arg2, "nextObject"
0x00003ce9 <-[InstallerController openFile:withOptions:]+53>:
mov %eax,4(%esp)
0x00003ced <-[InstallerController openFile:withOptions:]+57>:
mov %esi,(%esp) <-- arg1, enumerator
0x00003cf0 <-[InstallerController openFile:withOptions:]+60>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003cf5 <-[InstallerController openFile:withOptions:]+65>:
mov %eax,%ebx
0x00003cf7 <-[InstallerController openFile:withOptions:]+67>:
test %eax,%eax <-- if 0 (end of options), jump to +103
0x00003cf9 <-[InstallerController openFile:withOptions:]+69>:
je 0x3d1b <-[InstallerController openFile:withOptions:]+103>
0x00003cfb <-[InstallerController openFile:withOptions:]+71>:
mov %edi,8(%esp)
0x00003cff <-[InstallerController openFile:withOptions:]+75>:
mov 0x34f44,%eax
0x00003d04 <-[InstallerController openFile:withOptions:]+80>:
mov %eax,4(%esp)
0x00003d08 <-[InstallerController openFile:withOptions:]+84>:
mov %ebx,(%esp)
0x00003d0b <-[InstallerController openFile:withOptions:]+87>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003d10 <-[InstallerController openFile:withOptions:]+92>:
test %al,%al
0x00003d12 <-[InstallerController openFile:withOptions:]+94>:
je 0x3ce4 <-[InstallerController openFile:withOptions:]+48>
0x00003d14 <-[InstallerController openFile:withOptions:]+96>:
mov $0x1,%esi
0x00003d19 <-[InstallerController openFile:withOptions:]+101>:
jmp 0x3d1d <-[InstallerController openFile:withOptions:]+105>
0x00003d1b <-[InstallerController openFile:withOptions:]+103>:
xor %esi,%esi
0x00003d1d <-[InstallerController openFile:withOptions:]+105>:
call 0x33117 <dyld_stub___commpage_dsmos>
0x00003d22 <-[InstallerController openFile:withOptions:]+110>:
cmpl $0x202c7265,248(%eax)
0x00003d2c <-[InstallerController openFile:withOptions:]+120>:
je 0x3d2e <-[InstallerController openFile:withOptions:]+122>
0x00003d2e <-[InstallerController openFile:withOptions:]+122>:
mov %esi,%edx
0x00003d30 <-[InstallerController openFile:withOptions:]+124>:
test %dl,%dl
0x00003d32 <-[InstallerController openFile:withOptions:]+126>:
je 0x3d3e <-[InstallerController openFile:withOptions:]+138>
0x00003d34 <-[InstallerController openFile:withOptions:]+128>:
mov 0x34f40,%eax
0x00003d39 <-[InstallerController openFile:withOptions:]+133>:
jmp 0x3f12 <-[InstallerController openFile:withOptions:]+606>
0x00003d3e <-[InstallerController openFile:withOptions:]+138>:
mov 20(%ebp),%eax
0x00003d41 <-[InstallerController openFile:withOptions:]+141>:
test %eax,%eax
0x00003d43 <-[InstallerController openFile:withOptions:]+143>:
jne 0x3d57 <-[InstallerController openFile:withOptions:]+163>
0x00003d45 <-[InstallerController openFile:withOptions:]+145>:
lea -28(%ebp),%eax <-- load what into eax?
0x00003d48 <-[InstallerController openFile:withOptions:]+148>:
mov %eax,12(%esp) <-- arg4 to something
0x00003d4c <-[InstallerController openFile:withOptions:]+152>:
mov %edi,8(%esp) <-- arg3 (file path) to something
0x00003d50 <-[InstallerController openFile:withOptions:]+156>:
mov 0x34f3c,%eax <-- newControllerForDistributionAtPath:withError:
0x00003d55 <-[InstallerController openFile:withOptions:]+161>:
jmp 0x3d85 <-[InstallerController openFile:withOptions:]+209> <--
jump to +209, 0x3d85

0x00003d57 <-[InstallerController openFile:withOptions:]+163>:
cmpl $0x1,20(%ebp)
0x00003d5b <-[InstallerController openFile:withOptions:]+167>:
jne 0x3d6f <-[InstallerController openFile:withOptions:]+187>
0x00003d5d <-[InstallerController openFile:withOptions:]+169>:
lea -28(%ebp),%eax
0x00003d60 <-[InstallerController openFile:withOptions:]+172>:
mov %eax,12(%esp)
0x00003d64 <-[InstallerController openFile:withOptions:]+176>:
mov %edi,8(%esp)
0x00003d68 <-[InstallerController openFile:withOptions:]+180>:
mov 0x34f38,%eax
0x00003d6d <-[InstallerController openFile:withOptions:]+185>:
jmp 0x3d85 <-[InstallerController openFile:withOptions:]+209>
0x00003d6f <-[InstallerController openFile:withOptions:]+187>:
cmpl $0x2,20(%ebp)
0x00003d73 <-[InstallerController openFile:withOptions:]+191>:
jne 0x3d98 <-[InstallerController openFile:withOptions:]+228>
0x00003d75 <-[InstallerController openFile:withOptions:]+193>:
lea -28(%ebp),%eax
0x00003d78 <-[InstallerController openFile:withOptions:]+196>:
mov %eax,12(%esp)
0x00003d7c <-[InstallerController openFile:withOptions:]+200>:
mov %edi,8(%esp)
0x00003d80 <-[InstallerController openFile:withOptions:]+204>:
mov 0x34f34,%eax

jumped to via +161, and others.

0x00003d85 <-[InstallerController openFile:withOptions:]+209>:
mov %eax,4(%esp) <-- arg2, 0x34f3c,
newControllerForDistributionAtPath:withError:
0x00003d89 <-[InstallerController openFile:withOptions:]+213>:
mov 0x35c18,%eax <-- arg1, PageController
0x00003d8e <-[InstallerController openFile:withOptions:]+218>:
mov %eax,(%esp)
0x00003d91 <-[InstallerController openFile:withOptions:]+221>:
call 0x330e5 <dyld_stub_objc_msgSend> <-- +[PageController
newControllerForDistributionAtPath:withError:]
0x00003d96 <-[InstallerController openFile:withOptions:]+226>:
mov %eax,%ebx
0x00003d98 <-[InstallerController openFile:withOptions:]+228>:
test %ebx,%ebx
0x00003d9a <-[InstallerController openFile:withOptions:]+230>:
je 0x3f28 <-[InstallerController openFile:withOptions:]+628> <--
If there was an error (returned NULL, jump to +628


0x00003da0 <-[InstallerController openFile:withOptions:]+236>:
mov 0x3500c,%eax
0x00003da5 <-[InstallerController openFile:withOptions:]+241>:
mov %eax,4(%esp)
0x00003da9 <-[InstallerController openFile:withOptions:]+245>:
mov 0x35c3c,%eax
0x00003dae <-[InstallerController openFile:withOptions:]+250>:
mov %eax,(%esp)
0x00003db1 <-[InstallerController openFile:withOptions:]+253>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003db6 <-[InstallerController openFile:withOptions:]+258>:
mov %ebx,20(%esp)
0x00003dba <-[InstallerController openFile:withOptions:]+262>:
mov 208928,%edx
0x00003dc0 <-[InstallerController openFile:withOptions:]+268>:
mov (%edx),%edx
0x00003dc2 <-[InstallerController openFile:withOptions:]+270>:
mov %edx,16(%esp)
0x00003dc6 <-[InstallerController openFile:withOptions:]+274>:
mov 216880,%edx
0x00003dcc <-[InstallerController openFile:withOptions:]+280>:
mov %edx,12(%esp)
0x00003dd0 <-[InstallerController openFile:withOptions:]+284>:
mov 8(%ebp),%edx
0x00003dd3 <-[InstallerController openFile:withOptions:]+287>:
mov %edx,8(%esp)
0x00003dd7 <-[InstallerController openFile:withOptions:]+291>:
mov 217084,%edx
0x00003ddd <-[InstallerController openFile:withOptions:]+297>:
mov %edx,4(%esp)
0x00003de1 <-[InstallerController openFile:withOptions:]+301>:
mov %eax,(%esp)
0x00003de4 <-[InstallerController openFile:withOptions:]+304>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003de9 <-[InstallerController openFile:withOptions:]+309>:
mov 8(%ebp),%eax
0x00003dec <-[InstallerController openFile:withOptions:]+312>:
cmpb $0x0,30(%eax)
0x00003df0 <-[InstallerController openFile:withOptions:]+316>:
je 0x3e26 <-[InstallerController openFile:withOptions:]+370>
0x00003df2 <-[InstallerController openFile:withOptions:]+318>:
mov 0x34f2c,%eax
0x00003df7 <-[InstallerController openFile:withOptions:]+323>:
mov %eax,4(%esp)
0x00003dfb <-[InstallerController openFile:withOptions:]+327>:
mov 0x35c14,%eax
0x00003e00 <-[InstallerController openFile:withOptions:]+332>:
mov %eax,(%esp)
0x00003e03 <-[InstallerController openFile:withOptions:]+335>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003e08 <-[InstallerController openFile:withOptions:]+340>:
movl $0x31178,12(%esp)
0x00003e10 <-[InstallerController openFile:withOptions:]+348>:
mov %edi,8(%esp)
0x00003e14 <-[InstallerController openFile:withOptions:]+352>:
mov 216872,%edx
0x00003e1a <-[InstallerController openFile:withOptions:]+358>:
mov %edx,4(%esp)
0x00003e1e <-[InstallerController openFile:withOptions:]+362>:
mov %eax,(%esp)
0x00003e21 <-[InstallerController openFile:withOptions:]+365>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003e26 <-[InstallerController openFile:withOptions:]+370>:
mov 0x34f24,%eax
0x00003e2b <-[InstallerController openFile:withOptions:]+375>:
mov %eax,4(%esp)
0x00003e2f <-[InstallerController openFile:withOptions:]+379>:
mov %ebx,(%esp)
0x00003e32 <-[InstallerController openFile:withOptions:]+382>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003e37 <-[InstallerController openFile:withOptions:]+387>:
mov %eax,8(%esp)
0x00003e3b <-[InstallerController openFile:withOptions:]+391>:
mov 0x34f20,%eax
0x00003e40 <-[InstallerController openFile:withOptions:]+396>:
mov %eax,4(%esp)
0x00003e44 <-[InstallerController openFile:withOptions:]+400>:
mov 8(%ebp),%edx
0x00003e47 <-[InstallerController openFile:withOptions:]+403>:
mov %edx,(%esp)
0x00003e4a <-[InstallerController openFile:withOptions:]+406>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003e4f <-[InstallerController openFile:withOptions:]+411>:
mov 20(%ebp),%esi
0x00003e52 <-[InstallerController openFile:withOptions:]+414>:
test %esi,%esi
0x00003e54 <-[InstallerController openFile:withOptions:]+416>:
je 0x3eac <-[InstallerController openFile:withOptions:]+504>
0x00003e56 <-[InstallerController openFile:withOptions:]+418>:
mov 0x34f24,%eax
0x00003e5b <-[InstallerController openFile:withOptions:]+423>:
mov %eax,4(%esp)
0x00003e5f <-[InstallerController openFile:withOptions:]+427>:
mov %ebx,(%esp)
0x00003e62 <-[InstallerController openFile:withOptions:]+430>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003e67 <-[InstallerController openFile:withOptions:]+435>:
movl $0x0,8(%esp)
0x00003e6f <-[InstallerController openFile:withOptions:]+443>:
mov 216860,%edx
0x00003e75 <-[InstallerController openFile:withOptions:]+449>:
mov %edx,4(%esp)
0x00003e79 <-[InstallerController openFile:withOptions:]+453>:
mov %eax,(%esp)
0x00003e7c <-[InstallerController openFile:withOptions:]+456>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003e81 <-[InstallerController openFile:withOptions:]+461>:
mov 0x34f24,%eax
0x00003e86 <-[InstallerController openFile:withOptions:]+466>:
mov %eax,4(%esp)
0x00003e8a <-[InstallerController openFile:withOptions:]+470>:
mov %ebx,(%esp)
0x00003e8d <-[InstallerController openFile:withOptions:]+473>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003e92 <-[InstallerController openFile:withOptions:]+478>:
movl $0x0,8(%esp)
0x00003e9a <-[InstallerController openFile:withOptions:]+486>:
mov 216856,%edx
0x00003ea0 <-[InstallerController openFile:withOptions:]+492>:
mov %edx,4(%esp)
0x00003ea4 <-[InstallerController openFile:withOptions:]+496>:
mov %eax,(%esp)
0x00003ea7 <-[InstallerController openFile:withOptions:]+499>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003eac <-[InstallerController openFile:withOptions:]+504>:
mov 0x34f14,%eax
0x00003eb1 <-[InstallerController openFile:withOptions:]+509>:
mov %eax,4(%esp)
0x00003eb5 <-[InstallerController openFile:withOptions:]+513>:
mov 0x35c10,%eax
0x00003eba <-[InstallerController openFile:withOptions:]+518>:
mov %eax,(%esp)
0x00003ebd <-[InstallerController openFile:withOptions:]+521>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003ec2 <-[InstallerController openFile:withOptions:]+526>:
test %al,%al
0x00003ec4 <-[InstallerController openFile:withOptions:]+528>:
je 0x3ef1 <-[InstallerController openFile:withOptions:]+573>
0x00003ec6 <-[InstallerController openFile:withOptions:]+530>:
mov 0x34f24,%eax
0x00003ecb <-[InstallerController openFile:withOptions:]+535>:
mov %eax,4(%esp)
0x00003ecf <-[InstallerController openFile:withOptions:]+539>:
mov %ebx,(%esp)
0x00003ed2 <-[InstallerController openFile:withOptions:]+542>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003ed7 <-[InstallerController openFile:withOptions:]+547>:
movl $0x0,8(%esp)
0x00003edf <-[InstallerController openFile:withOptions:]+555>:
mov 216856,%edx
0x00003ee5 <-[InstallerController openFile:withOptions:]+561>:
mov %edx,4(%esp)
0x00003ee9 <-[InstallerController openFile:withOptions:]+565>:
mov %eax,(%esp)
0x00003eec <-[InstallerController openFile:withOptions:]+568>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003ef1 <-[InstallerController openFile:withOptions:]+573>:
mov 8(%ebp),%edx
0x00003ef4 <-[InstallerController openFile:withOptions:]+576>:
mov 20(%edx),%eax
0x00003ef7 <-[InstallerController openFile:withOptions:]+579>:
mov %ebx,8(%esp)
0x00003efb <-[InstallerController openFile:withOptions:]+583>:
mov 216848,%edx
0x00003f01 <-[InstallerController openFile:withOptions:]+589>:
mov %edx,4(%esp)
0x00003f05 <-[InstallerController openFile:withOptions:]+593>:
mov %eax,(%esp)
0x00003f08 <-[InstallerController openFile:withOptions:]+596>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003f0d <-[InstallerController openFile:withOptions:]+601>:
mov 0x34d10,%eax
0x00003f12 <-[InstallerController openFile:withOptions:]+606>:
mov %eax,4(%esp)
0x00003f16 <-[InstallerController openFile:withOptions:]+610>:
mov %ebx,(%esp)
0x00003f19 <-[InstallerController openFile:withOptions:]+613>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003f1e <-[InstallerController openFile:withOptions:]+618>:
mov $0x1,%eax
0x00003f23 <-[InstallerController openFile:withOptions:]+623>:
jmp 0x40d7 <-[InstallerController openFile:withOptions:]+1059>


Jumped to if -[PageController
newControllerForDistributionAtPath:withError:] returns NULL, at +230

0x00003f28 <-[InstallerController openFile:withOptions:]+628>:
mov -28(%ebp),%edx
0x00003f2b <-[InstallerController openFile:withOptions:]+631>:
test %edx,%edx
0x00003f2d <-[InstallerController openFile:withOptions:]+633>:
je 0x3fbf <-[InstallerController openFile:withOptions:]+779> <--
If the error is NULL, jump to +779
0x00003f33 <-[InstallerController openFile:withOptions:]+639>:
mov 0x34f0c,%eax
0x00003f38 <-[InstallerController openFile:withOptions:]+644>:
mov %eax,4(%esp) <-- arg2, "domain"
0x00003f3c <-[InstallerController openFile:withOptions:]+648>:
mov %edx,(%esp) <-- arg1, NSError "Error
com.apple.installer.pagecontroller -1"
Domain=com.apple.installer.pagecontroller Code=-1
0x00003f3f <-[InstallerController openFile:withOptions:]+651>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003f44 <-[InstallerController openFile:withOptions:]+656>:
movl $0x31308,8(%esp) <-- @"com.apple.installer.pagecontroller"
0x00003f4c <-[InstallerController openFile:withOptions:]+664>:
mov 216840,%edx <-- arg2, isEqualToString
0x00003f52 <-[InstallerController openFile:withOptions:]+670>:
mov %edx,4(%esp)
0x00003f56 <-[InstallerController openFile:withOptions:]+674>:
mov %eax,(%esp) <-- arg1, the above result of -[NSError domain]
0x00003f59 <-[InstallerController openFile:withOptions:]+677>:
call 0x330e5 <dyld_stub_objc_msgSend> <-- -[NSString isEqualToString]
0x00003f5e <-[InstallerController openFile:withOptions:]+682>:
test %al,%al
0x00003f60 <-[InstallerController openFile:withOptions:]+684>:
je 0x3fbf <-[InstallerController openFile:withOptions:]+779> <--
If the domain is not "com.apple.installer.pagecontroller", jump to +779
0x00003f62 <-[InstallerController openFile:withOptions:]+686>:
mov 0x34f04,%eax <-- arg2, "code"
0x00003f67 <-[InstallerController openFile:withOptions:]+691>:
mov %eax,4(%esp)
0x00003f6b <-[InstallerController openFile:withOptions:]+695>:
mov -28(%ebp),%eax <-- arg1, the NSError instance from +209 (on
our stack)
0x00003f6e <-[InstallerController openFile:withOptions:]+698>:
mov %eax,(%esp)
0x00003f71 <-[InstallerController openFile:withOptions:]+701>:
call 0x330e5 <dyld_stub_objc_msgSend> <-- -[NSError code]
0x00003f76 <-[InstallerController openFile:withOptions:]+706>:
sub $0x1,%eax
0x00003f79 <-[InstallerController openFile:withOptions:]+709>:
jne 0x3fbf <-[InstallerController openFile:withOptions:]+779> <--
if the NSError code is < 0, jump to +799
0x00003f7b <-[InstallerController openFile:withOptions:]+711>:
mov 8(%ebp),%edx <-- self
0x00003f7e <-[InstallerController openFile:withOptions:]+714>:
mov 20(%edx),%eax <-- withOptions
0x00003f81 <-[InstallerController openFile:withOptions:]+717>:
mov 216832,%edx
0x00003f87 <-[InstallerController openFile:withOptions:]+723>:
mov %edx,4(%esp)
0x00003f8b <-[InstallerController openFile:withOptions:]+727>:
mov %eax,(%esp)
0x00003f8e <-[InstallerController openFile:withOptions:]+730>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003f93 <-[InstallerController openFile:withOptions:]+735>:
test %eax,%eax
0x00003f95 <-[InstallerController openFile:withOptions:]+737>:
jne 0x40d5 <-[InstallerController openFile:withOptions:]+1057>
0x00003f9b <-[InstallerController openFile:withOptions:]+743>:
mov 0x33024,%eax
0x00003fa0 <-[InstallerController openFile:withOptions:]+748>:
mov (%eax),%edx
0x00003fa2 <-[InstallerController openFile:withOptions:]+750>:
mov 8(%ebp),%eax
0x00003fa5 <-[InstallerController openFile:withOptions:]+753>:
mov %eax,8(%esp)
0x00003fa9 <-[InstallerController openFile:withOptions:]+757>:
mov 0x34ff0,%eax
0x00003fae <-[InstallerController openFile:withOptions:]+762>:
mov %eax,4(%esp)
0x00003fb2 <-[InstallerController openFile:withOptions:]+766>:
mov %edx,(%esp)
0x00003fb5 <-[InstallerController openFile:withOptions:]+769>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003fba <-[InstallerController openFile:withOptions:]+774>:
jmp 0x40d5 <-[InstallerController openFile:withOptions:]+1057> <--
Skip the NSAlert

<-- jumped to from +633 if the NSError from the newController call at
+209 is NULL
<-- jumped to from +684 if the NSError from the newController call at
+209 is not in the "com.apple.installer.pagecontroller" domain
<-- jumped to from +709 of the NSError code < 0

0x00003fbf <-[InstallerController openFile:withOptions:]+779>:
mov 220196,%esi
0x00003fc5 <-[InstallerController openFile:withOptions:]+785>:
mov 0x34efc,%eax <-- arg2, "lastPathComponent"
0x00003fca <-[InstallerController openFile:withOptions:]+790>:
mov %eax,4(%esp)
0x00003fce <-[InstallerController openFile:withOptions:]+794>:
mov %edi,(%esp) <-- arg1, File path
0x00003fd1 <-[InstallerController openFile:withOptions:]+797>:
call 0x330e5 <dyld_stub_objc_msgSend> <-- -[NSString
lastPathComponent]
0x00003fd6 <-[InstallerController openFile:withOptions:]+802>:
mov %eax,%ebx
0x00003fd8 <-[InstallerController openFile:withOptions:]+804>:
mov 0x34fec,%eax
0x00003fdd <-[InstallerController openFile:withOptions:]+809>:
mov %eax,4(%esp)
0x00003fe1 <-[InstallerController openFile:withOptions:]+813>:
mov 0x35c30,%eax
0x00003fe6 <-[InstallerController openFile:withOptions:]+818>:
mov %eax,(%esp)
0x00003fe9 <-[InstallerController openFile:withOptions:]+821>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00003fee <-[InstallerController openFile:withOptions:]+826>:
movl $0x0,16(%esp)
0x00003ff6 <-[InstallerController openFile:withOptions:]+834>:
movl $0x31048,12(%esp) <-- arg4, @""
0x00003ffe <-[InstallerController openFile:withOptions:]+842>:
movl $0x31318,8(%esp) <-- arg3, OpenFailedMsg
0x00004006 <-[InstallerController openFile:withOptions:]+850>:
mov 217064,%edx <-- arg2, "localizedStringForKey:value:table:
0x0000400c <-[InstallerController openFile:withOptions:]+856>:
mov %edx,4(%esp)
0x00004010 <-[InstallerController openFile:withOptions:]+860>:
mov %eax,(%esp) <-- arg1, ??
0x00004013 <-[InstallerController openFile:withOptions:]+863>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00004018 <-[InstallerController openFile:withOptions:]+868>:
mov %ebx,12(%esp) <-- arg3, last path component, from +797
("file.pkg")
0x0000401c <-[InstallerController openFile:withOptions:]+872>:
mov %eax,8(%esp) <-- arg2, localized error message. @"Couldn't
open "%@"."
0x00004020 <-[InstallerController openFile:withOptions:]+876>:
mov 0x34ef8,%eax <-- arg1, "stringWithFormat:"
0x00004025 <-[InstallerController openFile:withOptions:]+881>:
mov %eax,4(%esp)
0x00004029 <-[InstallerController openFile:withOptions:]+885>:
mov %esi,(%esp) <-- arg1, NSString
0x0000402c <-[InstallerController openFile:withOptions:]+888>:
call 0x330e5 <dyld_stub_objc_msgSend> +[NSstring stringWithFormat:]
0x00004031 <-[InstallerController openFile:withOptions:]+893>:
mov %eax,%esi
0x00004033 <-[InstallerController openFile:withOptions:]+895>:
mov 0x34fec,%eax <-- arg2, mainBundle
0x00004038 <-[InstallerController openFile:withOptions:]+900>:
mov %eax,4(%esp)
0x0000403c <-[InstallerController openFile:withOptions:]+904>:
mov 0x35c30,%eax
0x00004041 <-[InstallerController openFile:withOptions:]+909>:
mov %eax,(%esp)
0x00004044 <-[InstallerController openFile:withOptions:]+912>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00004049 <-[InstallerController openFile:withOptions:]+917>:
movl $0x0,16(%esp)
0x00004051 <-[InstallerController openFile:withOptions:]+925>:
movl $0x31048,12(%esp)
0x00004059 <-[InstallerController openFile:withOptions:]+933>:
movl $0x31148,8(%esp) <-- arg3, @"OK"
0x00004061 <-[InstallerController openFile:withOptions:]+941>:
mov 217064,%edx <-- arg2, "localizedStringForKey:value:table:"
0x00004067 <-[InstallerController openFile:withOptions:]+947>:
mov %edx,4(%esp)
0x0000406b <-[InstallerController openFile:withOptions:]+951>:
mov %eax,(%esp)
0x0000406e <-[InstallerController openFile:withOptions:]+954>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x00004073 <-[InstallerController openFile:withOptions:]+959>:
mov %eax,%ebx
0x00004075 <-[InstallerController openFile:withOptions:]+961>:
mov 0x34fec,%eax <-- arg2, mainBundle
0x0000407a <-[InstallerController openFile:withOptions:]+966>:
mov %eax,4(%esp)
0x0000407e <-[InstallerController openFile:withOptions:]+970>:
mov 0x35c30,%eax
0x00004083 <-[InstallerController openFile:withOptions:]+975>:
mov %eax,(%esp)
0x00004086 <-[InstallerController openFile:withOptions:]+978>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x0000408b <-[InstallerController openFile:withOptions:]+983>:
movl $0x0,16(%esp)
0x00004093 <-[InstallerController openFile:withOptions:]+991>:
movl $0x31048,12(%esp)
0x0000409b <-[InstallerController openFile:withOptions:]+999>:
movl $0x31328,8(%esp) <-- arg3, "OpenFailed"
0x000040a3 <-[InstallerController openFile:withOptions:]+1007>:
mov 217064,%edx <-- arg2, "localizedStringForKey:value:table:"
0x000040a9 <-[InstallerController openFile:withOptions:]+1013>:
mov %edx,4(%esp)
0x000040ad <-[InstallerController openFile:withOptions:]+1017>:
mov %eax,(%esp)
0x000040b0 <-[InstallerController openFile:withOptions:]+1020>:
call 0x330e5 <dyld_stub_objc_msgSend>
0x000040b5 <-[InstallerController openFile:withOptions:]+1025>:
movl $0x0,16(%esp)
0x000040bd <-[InstallerController openFile:withOptions:]+1033>:
movl $0x0,12(%esp)
0x000040c5 <-[InstallerController openFile:withOptions:]+1041>:
mov %ebx,8(%esp)
0x000040c9 <-[InstallerController openFile:withOptions:]+1045>:
mov %esi,4(%esp)
0x000040cd <-[InstallerController openFile:withOptions:]+1049>:
mov %eax,(%esp)
0x000040d0 <-[InstallerController openFile:withOptions:]+1052>:
call 0x33112 <dyld_stub_NSRunAlertPanel>

<-- Jumped to from +774

0x000040d5 <-[InstallerController openFile:withOptions:]+1057>:
xor %eax,%eax
0x000040d7 <-[InstallerController openFile:withOptions:]+1059>:
add $0x3c,%esp
0x000040da <-[InstallerController openFile:withOptions:]+1062>:
pop %ebx
0x000040db <-[InstallerController openFile:withOptions:]+1063>:
pop %esi
0x000040dc <-[InstallerController openFile:withOptions:]+1064>:
pop %edi
0x000040dd <-[InstallerController openFile:withOptions:]+1065>:
pop %ebp
0x000040de <-[InstallerController openFile:withOptions:]+1066>: ret
0x000040df <-[InstallerController openFile:withOptions:]+1067>: nop
0x000040e0 <-[InstallerController openFile:withOptions:]+1068>: nop
0x000040e1 <-[InstallerController openFile:withOptions:]+1069>: nop
End of assembler dump.

PGP.sig

Rosyna

unread,
Jan 28, 2007, 12:54:37 AM1/28/07
to moab...@googlegroups.com, Landon Fuller
It might be easier to context patch -lastPathComponent rather than
NSRunAlert. But yeah, this bug is identical to the SWUP bug.

If you were going to patch localizedStringForKey:value:table:, you
could do it if the key is @"OpenFailedMsg". But I think
lastPathComponent may be easier as it doesn't destroy any of the data.

Ack, at 1/27/07, Landon Fuller said:

>Annotated disassembly follows. Of interest:
>
>A controller is instantiated here, returns failure (can't open the
>file): 0x00003d91 +221
>
>The failure is detected, and the code jumps here, to set up the
>dialog: 0x00003fbf +779
>
>For the patch, I'm thinking either:
> - Patch localizedStringForKey:value:table:, returning a
>localized string that will not include the file's path (ie, omit %@)
>or
> - Context-patch NSRunAlertPanel while in
>-[InstallerController openFile:withOptions:, escaping % in the msg
>argument

--


Sincerely,
Rosyna Keller
Technical Support/Carbon troll/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People

It's either this, or imagining Phil Schiller in a thong.

Landon Fuller

unread,
Jan 28, 2007, 2:59:42 PM1/28/07
to moab...@googlegroups.com

On Jan 27, 2007, at 9:54 PM, Rosyna wrote:

>
> It might be easier to context patch -lastPathComponent rather than
> NSRunAlert. But yeah, this bug is identical to the SWUP bug.
>
> If you were going to patch localizedStringForKey:value:table:, you
> could do it if the key is @"OpenFailedMsg". But I think
> lastPathComponent may be easier as it doesn't destroy any of the data.

I went with NSRunAlertPanel() just because the failure case is
innocuous (no substitutions in an alert).
http://moab-fixes.googlecode.com/svn/trunk/installer_openfile_handler.m

The code patches -[InstallerController openFile:withOptions:], uses a
reference count to patch/unpatch NSRunAlertPanel().

-landonf

PGP.sig

Toad

unread,
Jan 29, 2007, 1:56:01 AM1/29/07
to MOAB Fixes
I just ran into a problem with software update on the latest 27 ape
fix.
When I had the ape fix check in application enhancer, I would go and
try to
install the apple quicktime update, and it would ask for root
password. So I entered
and it gave me an invalid password error. So I tried and tried again.
I know what the
root password is and all, but it still wouldn't let me install it. So
finally I remember that your guys had
patch the software update thing, so I disabled the patch in
application enhancer by unchecking
it, then reentered my root password and poof it works. So I would
assume something is not working
right in the software update patch, but it could be another
conflicting patch as well.

Toad

Rosyna

unread,
Jan 29, 2007, 2:02:37 AM1/29/07
to moab...@googlegroups.com, Toad
How could it be related to the patch? The process that shows the
dialog and handles authentication is completely different from
software update.app and the actual updating process is yet another
program.

--

Toad

unread,
Jan 29, 2007, 10:57:28 AM1/29/07
to MOAB Fixes
I don't know? All I do know is that as soon as I disabled the ape
patch it worked! Same password and everything. You guys designed it,
so I figured you guys might have some idea as to whats wrong.(I am not
blaming anyone, just reporting a bug I found)

Toad

Landon Fuller

unread,
Jan 29, 2007, 11:42:30 AM1/29/07
to moab...@googlegroups.com
That is very strange :)

Anyone know how to force a re-install of a previous update?
All of my machines are up to date so far, so I'm not sure how to try
and reproduce this.

-landonf

> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "MOAB Fixes" group.
> To post to this group, send email to moab...@googlegroups.com
> To unsubscribe from this group, send email to moabfixes-
> unsub...@googlegroups.com
> For more options, visit this group at http://groups.google.com/
> group/moabfixes?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

PGP.sig

Landon Fuller

unread,
Jan 29, 2007, 12:00:58 PM1/29/07
to moab...@googlegroups.com

On Jan 29, 2007, at 8:42 AM, Landon Fuller wrote:

> That is very strange :)
>
> Anyone know how to force a re-install of a previous update?
> All of my machines are up to date so far, so I'm not sure how to
> try and reproduce this.

I found a PPC machine of mine that didn't have the latest QT update,
but I wasn't able to reproduce the issue.
Anyone else seen this?

PGP.sig

Toad

unread,
Jan 29, 2007, 8:36:31 PM1/29/07
to MOAB Fixes
maybe it was just an anomaly in the OS, but if this helps any, I
downloaded the update by going into the quicktime player app and then
selecting the update exsisting software button, which then took me to
the software update thing and so on from their. Anyways, thanks for
looking at it though.

Toad

On Jan 29, 11:00 am, Landon Fuller <land...@bikemonkey.org> wrote:
> On Jan 29, 2007, at 8:42 AM, Landon Fuller wrote:
>
> > That is very strange :)
>
> > Anyone know how to force a re-install of a previous update?
> > All of my machines are up to date so far, so I'm not sure how to

> > try and reproduce this.I found a PPC machine of mine that didn't have the latest QT update,

Reply all
Reply to author
Forward
0 new messages