Skip to content

Instantly share code, notes, and snippets.

@landonf
landonf / disassembly.txt
Last active October 3, 2019 18:18
Explaining the File:/// bug. See also http://openradar.appspot.com/13128709
In DDResultCopyExtractedURL in the DataDetectorsCore.framework, file:// URLs are sanity-checked with an assert:
0xCB86 loc_CB86:
0xCB86 lea rsi, cfstr_File ; "file://"
0xCB8D mov rdi, rbx
0xCB90 call _CFStringHasPrefix ; Check if the string starts with 'file://'
; Yes, this is case sensitive, which is why the test fails
0xCB95 test al, al
0xCB97 jne short loc_CBD4 ; If CFStringHasPrefix returns true, jump past the assert
; Otherwise, the following code triggers an assert: