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 files12
notkmhn/cve-2022-21449-tls-pocRevision fa239eebae2b
- ↑..Parent directory
- buildtag.go
- cftype.go
- context.go
- doc.go
- egltype.go
- fix.go
- gotypes.go
- jnitype.go
- main.go
- netipv6zone.go
- printerconfig.go
- typecheck.go
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
go/src/cmd/fix/jnitype.go
Go · 1,274 bytes// Copyright 2017 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.
package main
import (
"go/ast"
)
func init() {
register(jniFix)
}
var jniFix = fix{
name: "jni",
date: "2017-12-04",
f: jnifix,
desc: `Fixes initializers of JNI's jobject and subtypes`,
disabled: false,
}
// Old state:
//
// type jobject *_jobject
//
// New state:
//
// type jobject uintptr
//
// and similar for subtypes of jobject.
// This fix finds nils initializing these types and replaces the nils with 0s.
func jnifix(f *ast.File) bool {
return typefix(f, func(s string) bool {
switch s {
case "C.jobject":
return true
case "C.jclass":
return true
case "C.jthrowable":
return true
case "C.jstring":
return true
case "C.jarray":
return true
case "C.jbooleanArray":
return true
case "C.jbyteArray":
return true
case "C.jcharArray":
return true
case "C.jshortArray":
return true
case "C.jintArray":
return true
case "C.jlongArray":
return true
case "C.jfloatArray":
return true
case "C.jdoubleArray":
return true
case "C.jobjectArray":
return true
case "C.jweak":
return true
}
return false
})
}