Exploit databaseDownload repository ZIP
GH-8958357e96f9d8f8c98383150c404283
notkmhn/cve-2022-21449-tls-poc
Sources for CVE-2022-21449
14 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files55
notkmhn/cve-2022-21449-tls-pocRevision fa239eebae2b
- ↑..Parent directory
- bytealg.go
- compare_386.s
- compare_amd64.s
- compare_arm.s
- compare_arm64.s
- compare_generic.go
- compare_mips64x.s
- compare_mipsx.s
- compare_native.go
- compare_ppc64x.s
- compare_riscv64.s
- compare_s390x.s
- compare_wasm.s
- count_amd64.s
- count_arm.s
- count_arm64.s
- count_generic.go
- count_native.go
- count_ppc64x.s
- count_riscv64.s
- count_s390x.s
- equal_386.s
- equal_amd64.s
- equal_arm.s
- equal_arm64.s
- equal_generic.go
- equal_mips64x.s
- equal_mipsx.s
- equal_native.go
- equal_ppc64x.s
- equal_riscv64.s
- equal_s390x.s
- equal_wasm.s
- index_amd64.go
- index_amd64.s
- index_arm64.go
- index_arm64.s
- index_generic.go
- index_native.go
- index_ppc64x.go
- index_ppc64x.s
- index_s390x.go
- index_s390x.s
- indexbyte_386.s
- indexbyte_amd64.s
- indexbyte_arm.s
- indexbyte_arm64.s
- indexbyte_generic.go
- indexbyte_mips64x.s
- indexbyte_mipsx.s
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
go/src/internal/bytealg/compare_generic.go
Go · 1,040 bytes// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !386 && !amd64 && !s390x && !arm && !arm64 && !ppc64 && !ppc64le && !mips && !mipsle && !wasm && !mips64 && !mips64le && !riscv64
package bytealg
import _ "unsafe" // for go:linkname
func Compare(a, b []byte) int {
l := len(a)
if len(b) < l {
l = len(b)
}
if l == 0 || &a[0] == &b[0] {
goto samebytes
}
for i := 0; i < l; i++ {
c1, c2 := a[i], b[i]
if c1 < c2 {
return -1
}
if c1 > c2 {
return +1
}
}
samebytes:
if len(a) < len(b) {
return -1
}
if len(a) > len(b) {
return +1
}
return 0
}
//go:linkname runtime_cmpstring runtime.cmpstring
func runtime_cmpstring(a, b string) int {
l := len(a)
if len(b) < l {
l = len(b)
}
for i := 0; i < l; i++ {
c1, c2 := a[i], b[i]
if c1 < c2 {
return -1
}
if c1 > c2 {
return +1
}
}
if len(a) < len(b) {
return -1
}
if len(a) > len(b) {
return +1
}
return 0
}