Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inlining of CFString literals #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WeiN76LQh
Copy link

I'm not sure when this broke but on 4.3.6550-dev (1ae64a95) inlining of CFString literals when viewing a Mach-O binary is not working at all. This is caused by the type of global constant CFStrings in the __cfstring section being typed __NSConstantString. However this plugin is expecting them to be CFString.

This PR adds an additional check on the string's variable type to see if it is an __NSConstantString. There's probably a more robust solution to this but it at least gets the CFString inlining working again.

I'm not sure when this broke but on 4.3.6550-dev (1ae64a95) inlining of `CFString` literals when viewing a Mach-O binary is not working at all. This is caused by the type of global constant `CFString`s in the `__cfstring` section being typed `__NSConstantString`. However this plugin is expecting them to be `CFString`.

This PR adds an additional check on the string's variable type to see if it is an `__NSConstantString`. There's probably a more robust solution to this but it at least gets the `CFString` inlining working again.
WeiN76LQh pushed a commit to WeiN76LQh/binaryninja-api that referenced this pull request Jan 4, 2025
Basically just copied from the [workflow objc plugin](https://github.com/Vector35/workflow_objc) with [PR Vector35#67](Vector35/workflow_objc#67) applied.

Ideally this would not be a copy and these 2 codebases would share the code but its unclear if Vector35 would want to import the Objective-C workflow plugin into the BN API repo and what that would look like. So this is an intermediary solution to get `CFString` inlining working in DSC.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant