mirror of https://bitbucket.org/ausocean/av.git
codec/h264/h264dec/fuzz/helpers.c: checking if malloc bit reader mem returns NULL
This commit is contained in:
parent
08264f7bf5
commit
d0f99b581d
|
@ -45,6 +45,9 @@ import (
|
|||
func Fuzz(data []byte) int {
|
||||
// Create C based BitReader based on data.
|
||||
cbr := C.new_BitReader((*C.char)(unsafe.Pointer(&data[0])), C.int(len(data)))
|
||||
if cbr == nil {
|
||||
panic("new_BitReader returned NULL pointer")
|
||||
}
|
||||
|
||||
// Get the level_prefix from the C code. If got is < 0, then the C code
|
||||
// doesn't like it and we shouldn't have that input in the corpus, so return -1.
|
||||
|
|
Loading…
Reference in New Issue