Skip to content

Commit

Permalink
ld64: Fix use after free
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoechtrager committed Feb 5, 2017
1 parent 42b9d15 commit 8e9c3f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cctools/ld64/src/ld/parsers/generic_dylib_file.hpp
Expand Up @@ -511,7 +511,7 @@ void File<A>::addSymbol(const char* name, bool weakDef, bool tlv, pint_t address
this->_ignoreExports.insert(strdup(symName));
}
else if ( strncmp(symAction, "install_name$", 13) == 0 ) {
this->_dylibInstallPath = symName;
this->_dylibInstallPath = strdup(symName); // ld64-port: added strdup()
this->_installPathOverride = true;
// <rdar://problem/14448206> CoreGraphics redirects to ApplicationServices, but with wrong compat version
if ( strcmp(this->_dylibInstallPath, "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices") == 0 )
Expand Down

0 comments on commit 8e9c3f2

Please sign in to comment.