Merge pull request #99 from microsoft/dilan/2.19.0-upgrade-conflict

Dilan/2.19.0 upgrade conflict
This commit is contained in:
dilanbhalla
2024-09-22 02:05:31 -07:00
committed by GitHub
5 changed files with 11 additions and 11 deletions

View File

@@ -131,11 +131,10 @@ class StrncpyBA extends BufferAccess {
result = this.(FunctionCall).getArgument(0) and
bufferDesc = "destination buffer" and
accessType = 2
// Ignore this case as reading past the source null terminator is not the behavior of strncpy
// or
// result = this.(FunctionCall).getArgument(1) and
// bufferDesc = "source buffer" and
// accessType = 2
or
result = this.(FunctionCall).getArgument(1) and
bufferDesc = "source buffer" and
accessType = 4
}
override Expr getSizeExpr() { result = this.(FunctionCall).getArgument(2) }

10
rust/lint.py Normal file → Executable file
View File

@@ -5,12 +5,14 @@ import pathlib
import shutil
import sys
extractor_dir = pathlib.Path(__file__).resolve().parent / "extractor"
this_dir = pathlib.Path(__file__).resolve().parent
cargo = shutil.which("cargo")
assert cargo, "no cargo binary found on `PATH`"
fmt = subprocess.run([cargo, "fmt", "--quiet"], cwd=extractor_dir)
clippy = subprocess.run([cargo, "clippy", "--fix", "--allow-dirty", "--allow-staged", "--quiet"],
cwd=extractor_dir)
fmt = subprocess.run([cargo, "fmt", "--all", "--quiet"], cwd=this_dir)
for manifest in this_dir.rglob("Cargo.toml"):
if not manifest.is_relative_to(this_dir / "ql") and not manifest.is_relative_to(this_dir / "integration-tests"):
clippy = subprocess.run([cargo, "clippy", "--fix", "--allow-dirty", "--allow-staged", "--quiet"],
cwd=manifest.parent)
sys.exit(fmt.returncode or clippy.returncode)

1
rust/tools/autobuild.sh Normal file → Executable file
View File

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

2
rust/tools/index-files.sh Normal file → Executable file
View File

@@ -2,4 +2,4 @@
set -eu
exec "$CODEQL_EXTRACTOR_RUST_ROOT/tools/$CODEQL_PLATFORM/extractor" --inputs-file="$1"
exec "$CODEQL_EXTRACTOR_RUST_ROOT/tools/$CODEQL_PLATFORM/extractor" @"$1"

0
rust/tools/qltest.sh Normal file → Executable file
View File