@@ -34,8 +34,6 @@ class StrdupFunction extends AllocationFunction, ArrayFunction, DataFlowFunction
3434 override predicate hasArrayWithNullTerminator ( int bufParam ) { bufParam = 0 }
3535
3636 override predicate hasDataFlow ( FunctionInput input , FunctionOutput output ) {
37- // These always copy the full value of the input buffer to the result
38- // buffer
3937 input .isParameterDeref ( 0 ) and
4038 output .isReturnValueDeref ( )
4139 }
@@ -44,7 +42,7 @@ class StrdupFunction extends AllocationFunction, ArrayFunction, DataFlowFunction
4442/**
4543 * A `strndup` style allocation function.
4644 */
47- class StrndupFunction extends AllocationFunction , ArrayFunction , TaintFunction {
45+ class StrndupFunction extends AllocationFunction , ArrayFunction , DataFlowFunction {
4846 StrndupFunction ( ) {
4947 exists ( string name |
5048 hasGlobalName ( name ) and
@@ -57,9 +55,7 @@ class StrndupFunction extends AllocationFunction, ArrayFunction, TaintFunction {
5755
5856 override predicate hasArrayWithNullTerminator ( int bufParam ) { bufParam = 0 }
5957
60- override predicate hasTaintFlow ( FunctionInput input , FunctionOutput output ) {
61- // This function may do only a partial copy of the input buffer to the output
62- // buffer, so it's a taint flow.
58+ override predicate hasDataFlow ( FunctionInput input , FunctionOutput output ) {
6359 (
6460 input .isParameterDeref ( 0 ) or
6561 input .isParameter ( 1 )
0 commit comments