File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
lib/PhasarLLVM/DataFlow/IfdsIde/Problems Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -281,7 +281,17 @@ IFDSTaintAnalysis::FlowFunctionPtrType
281281IFDSTaintAnalysis::getSummaryFlowFunction (
282282 [[maybe_unused]] IFDSTaintAnalysis::n_t CallSite,
283283 [[maybe_unused]] IFDSTaintAnalysis::f_t DestFun) {
284- // Don't use a special summary
284+ // $sSS1poiyS2S_SStFZ is Swift's String append method
285+ // if concat a tainted string with something else the
286+ // result should be tainted
287+ if (DestFun->getName ().equals (" $sSS1poiyS2S_SStFZ" )) {
288+ const auto *CS = llvm::cast<llvm::CallBase>(CallSite);
289+
290+ return generateFlowIf<d_t >(CallSite, [CS](d_t Source) {
291+ return ((Source == CS->getArgOperand (1 )) ||
292+ (Source == CS->getArgOperand (3 )));
293+ });
294+ }
285295 return nullptr ;
286296}
287297
You can’t perform that action at this time.
0 commit comments