Skip to content

Commit 87fe3bb

Browse files
fix wiremessage oob in case of intmin (#2076)
Co-authored-by: Preston Vasquez <[email protected]>
1 parent aa5b2d9 commit 87fe3bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x/mongo/driver/wiremessage/wiremessage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ func ReadMsgSectionDocumentSequence(src []byte) (identifier string, docs []bsonc
406406
// sequence data.
407407
func ReadMsgSectionRawDocumentSequence(src []byte) (identifier string, data []byte, rem []byte, ok bool) {
408408
length, rem, ok := readi32(src)
409-
if !ok || int(length) > len(src) || length-4 < 0 {
409+
if !ok || int(length) > len(src) || length < 4 {
410410
return "", nil, src, false
411411
}
412412

0 commit comments

Comments
 (0)