1 Star 0 Fork 0

FatCoder/go-netdicom

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
fuzzpdu.go 479 Bytes
Copy Edit Raw Blame History
lixiaoxiao authored 2022-08-13 21:59 +08:00 . init
package fuzzpdu
import (
"bytes"
"encoding/binary"
"flag"
"gitee.com/weili0115/go-netdicom/dimse"
"gitee.com/weili0115/go-netdicom/pdu"
"github.com/grailbio/go-dicom/dicomio"
)
func init() {
flag.Parse()
}
func Fuzz(data []byte) int {
in := bytes.NewBuffer(data)
if len(data) == 0 || data[0] <= 0xc0 {
pdu.ReadPDU(in, 4<<20) // nolint: errcheck
} else {
d := dicomio.NewDecoder(in, binary.LittleEndian, dicomio.ExplicitVR)
dimse.ReadMessage(d)
}
return 0
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/weili0115/go-netdicom.git
git@gitee.com:weili0115/go-netdicom.git
weili0115
go-netdicom
go-netdicom
6ca77c57cdf9

Search