Skip to content

Commit ba1646f

Browse files
authored
Merge pull request #99 from microsoft/dilan/2.19.0-upgrade-conflict
Dilan/2.19.0 upgrade conflict
2 parents 2ee42cb + a763263 commit ba1646f

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

cpp/ql/lib/semmle/code/cpp/security/BufferAccess.qll

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,10 @@ class StrncpyBA extends BufferAccess {
131131
result = this.(FunctionCall).getArgument(0) and
132132
bufferDesc = "destination buffer" and
133133
accessType = 2
134-
// Ignore this case as reading past the source null terminator is not the behavior of strncpy
135-
// or
136-
// result = this.(FunctionCall).getArgument(1) and
137-
// bufferDesc = "source buffer" and
138-
// accessType = 2
134+
or
135+
result = this.(FunctionCall).getArgument(1) and
136+
bufferDesc = "source buffer" and
137+
accessType = 4
139138
}
140139

141140
override Expr getSizeExpr() { result = this.(FunctionCall).getArgument(2) }

rust/lint.py

100644100755
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
import shutil
66
import sys
77

8-
extractor_dir = pathlib.Path(__file__).resolve().parent / "extractor"
8+
this_dir = pathlib.Path(__file__).resolve().parent
99

1010
cargo = shutil.which("cargo")
1111
assert cargo, "no cargo binary found on `PATH`"
1212

13-
fmt = subprocess.run([cargo, "fmt", "--quiet"], cwd=extractor_dir)
14-
clippy = subprocess.run([cargo, "clippy", "--fix", "--allow-dirty", "--allow-staged", "--quiet"],
15-
cwd=extractor_dir)
13+
fmt = subprocess.run([cargo, "fmt", "--all", "--quiet"], cwd=this_dir)
14+
for manifest in this_dir.rglob("Cargo.toml"):
15+
if not manifest.is_relative_to(this_dir / "ql") and not manifest.is_relative_to(this_dir / "integration-tests"):
16+
clippy = subprocess.run([cargo, "clippy", "--fix", "--allow-dirty", "--allow-staged", "--quiet"],
17+
cwd=manifest.parent)
1618
sys.exit(fmt.returncode or clippy.returncode)

rust/tools/autobuild.sh

100644100755
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22

33
exec "${CODEQL_DIST}/codeql" database index-files \
44
--working-dir=. --language=rust --include-extension=.rs \
5-
${CODEQL_VERBOSITY:+"--verbosity=${CODEQL_VERBOSITY}"} \
65
"${CODEQL_EXTRACTOR_RUST_WIP_DATABASE}"

rust/tools/index-files.sh

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
set -eu
44

5-
exec "$CODEQL_EXTRACTOR_RUST_ROOT/tools/$CODEQL_PLATFORM/extractor" --inputs-file="$1"
5+
exec "$CODEQL_EXTRACTOR_RUST_ROOT/tools/$CODEQL_PLATFORM/extractor" @"$1"

rust/tools/qltest.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)