summaryrefslogtreecommitdiff
path: root/vendor/github.com/jackc/pgx/v5/internal
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-01-03 10:03:16 +0000
committerLibravatar GitHub <noreply@github.com>2024-01-03 10:03:16 +0000
commit3ab621444945e876de6871254d86925d47d7d960 (patch)
treef7aa06862c24a86a85aa0f6246f2934c76fef559 /vendor/github.com/jackc/pgx/v5/internal
parent[chore]: Bump github.com/google/uuid from 1.4.0 to 1.5.0 (#2469) (diff)
downloadgotosocial-3ab621444945e876de6871254d86925d47d7d960.tar.xz
[chore]: Bump github.com/jackc/pgx/v5 from 5.5.0 to 5.5.1 (#2468)
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.5.0 to 5.5.1. - [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md) - [Commits](https://github.com/jackc/pgx/compare/v5.5.0...v5.5.1) --- updated-dependencies: - dependency-name: github.com/jackc/pgx/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/jackc/pgx/v5/internal')
-rw-r--r--vendor/github.com/jackc/pgx/v5/internal/sanitize/sanitize.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/vendor/github.com/jackc/pgx/v5/internal/sanitize/sanitize.go b/vendor/github.com/jackc/pgx/v5/internal/sanitize/sanitize.go
index e9e6d2287..f9091cd48 100644
--- a/vendor/github.com/jackc/pgx/v5/internal/sanitize/sanitize.go
+++ b/vendor/github.com/jackc/pgx/v5/internal/sanitize/sanitize.go
@@ -35,6 +35,11 @@ func (q *Query) Sanitize(args ...any) (string, error) {
str = part
case int:
argIdx := part - 1
+
+ if argIdx < 0 {
+ return "", fmt.Errorf("first sql argument must be > 0")
+ }
+
if argIdx >= len(args) {
return "", fmt.Errorf("insufficient arguments")
}