Merge pull request #2692 from jbj/pure-string-read

C++: Model that string functions read their buffer
This commit is contained in:
Robert Marsh
2020-01-27 11:40:03 -05:00
committed by GitHub
4 changed files with 24 additions and 13 deletions

View File

@@ -83,6 +83,11 @@ class PureStrFunction extends AliasFunction, ArrayFunction, TaintFunction, SideE
override predicate hasOnlySpecificReadSideEffects() { none() }
override predicate hasOnlySpecificWriteSideEffects() { any() }
override predicate hasSpecificReadSideEffect(ParameterIndex i, boolean buffer) {
getParameter(i).getUnspecifiedType() instanceof PointerType and
buffer = true
}
}
class PureFunction extends TaintFunction, SideEffectFunction {