diff --git a/codec/h264/h264dec/fuzz/fuzzParseLevelPrefix/fuzz.go b/codec/h264/h264dec/fuzz/fuzzParseLevelPrefix/fuzz.go index 6dd92378..9ee88dd1 100644 --- a/codec/h264/h264dec/fuzz/fuzzParseLevelPrefix/fuzz.go +++ b/codec/h264/h264dec/fuzz/fuzzParseLevelPrefix/fuzz.go @@ -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.