You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using ocf.NewDecoder(r) on a random avro file, the Decode operation panics due to a null pointer exception from hamba/avro. The issue is that newEfaceDecoder inside codec_dynamic does not check the error of genericReceiver and proceeds with a nil typ value, which causes a null pointer exception later in the code.
One fix could be to add a Null condition in genericReceiver in codec_generic.go:
case Null:
returnreflect2.TypeOf((*null)(nil)), nil
That at least results in a "avro: schema type null in unsupported" error rather than a NPE. Ideally errors should also not be ignored, and turned into some sort of error upward.
The text was updated successfully, but these errors were encountered:
Using
ocf.NewDecoder(r)
on a random avro file, the Decode operation panics due to a null pointer exception from hamba/avro. The issue is thatnewEfaceDecoder
inside codec_dynamic does not check the error ofgenericReceiver
and proceeds with a niltyp
value, which causes a null pointer exception later in the code.One fix could be to add a
Null
condition ingenericReceiver
in codec_generic.go:That at least results in a "avro: schema type null in unsupported" error rather than a NPE. Ideally errors should also not be ignored, and turned into some sort of error upward.
The text was updated successfully, but these errors were encountered: