GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — C++: Also fix variableMustBeNullTerminated. · ramdcoder/codeql@57fe4b9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • cpp/ql/lib/semmle/code/cpp/commons
    • NullTermination.qll
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎cpp/ql/lib/semmle/code/cpp/commons/NullTermination.qll‎

Copy file name to clipboardExpand all lines: cpp/ql/lib/semmle/code/cpp/commons/NullTermination.qll
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ predicate variableMustBeNullTerminated(VariableAccess va) {
120120
// Simplified: check that `p` may not be null terminated on *any*
121121
// path to `use` (including the one found via `parameterUsePair`)
122122
not exists(Expr e, BasicBlock bb1, int pos1, BasicBlock bb2, int pos2 |
123-
mayAddNullTerminator(e, p.getAnAccess()) and
124-
bb1.getNode(pos1) = e and
123+
mayAddNullTerminator(pragma[only_bind_into](e), p.getAnAccess()) and
124+
pragma[only_bind_into](bb1).getNode(pos1) = e and
125125
bb2.getNode(pos2) = use
126126
|
127127
bb1 = bb2 and pos1 < pos2

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.