Skip to content

Commit ea019e4

Browse files
(gosec) Apply G115 fixes to x/mongo/driver/operation package
Address gosec G115 integer overflow warnings in operations: - Add SafeConvertNumeric for operation timeout and option conversions - Handle overflow in find, aggregate, distinct, and update operations
1 parent 5cb6606 commit ea019e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x/mongo/driver/operation/hello.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ func (h *Hello) handshakeCommand(dst []byte, desc description.SelectedServer) ([
576576
func (h *Hello) command(dst []byte, desc description.SelectedServer) ([]byte, error) {
577577
// Use "hello" if topology is LoadBalanced, API version is declared or server
578578
// has responded with "helloOk". Otherwise, use legacy hello.
579-
if h.loadBalanced || h.serverAPI != nil || desc.Server.HelloOK {
579+
if h.loadBalanced || h.serverAPI != nil || desc.HelloOK {
580580
dst = bsoncore.AppendInt32Element(dst, "hello", 1)
581581
} else {
582582
dst = bsoncore.AppendInt32Element(dst, handshake.LegacyHello, 1)

0 commit comments

Comments
 (0)