avro icon indicating copy to clipboard operation
avro copied to clipboard

Avro-4193: [c] segfault cannot handle empty byte array

Open steven-aerts opened this issue 2 months ago • 2 comments

What is the purpose of the change

When avro-c tries to encode an empty byte array it will avro_malloc(0) which on some architectures will return NULL. Make sure this is not interpreted as an error or or dereferenced causing a segfault.

Verifying this change

Extended unit tests to validate this case

Documentation

  • Does this pull request introduce a new feature? no

steven-aerts avatar Oct 24 '25 12:10 steven-aerts

Please rebase!

martin-g avatar Oct 24 '25 12:10 martin-g

@martin-g sorry for that, rebased on main.

steven-aerts avatar Oct 24 '25 14:10 steven-aerts