Skip to content

Finding "buffer used as sprintf target" #7427

Answered by MathiasVP
atwilso asked this question in Q&A
Discussion options

You must be logged in to vote

I think you'll get the results you want if you select the right-hand side of the assignment as your source (instead of the assignment itself):

  override predicate isSource(DataFlow::Node arg) {
    exists(Assignment a |
      a.getRValue() = arg.asExpr() and
      isBigBufferAccess(a.getRValue())
    )
  }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by adityasharad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants