Ten0 / serde_avro_fast

An idiomatic implementation of serde/avro (de)serialization
GNU Lesser General Public License v3.0
20 stars 4 forks source link

Check that Schema graph is not zero-sized cyclic #7

Closed Ten0 closed 9 months ago

Ten0 commented 10 months ago

Check at schema validation that graph is not zero-sized cyclic: e.g. node 1 is a record that always contains a field that is node 2, which is a record that always contains a field that is node 1.

This would mean the valid serialized/deserialized avro is not defined as it would recurse indefinitely.

This currently would cause the deserializer to stack overflow: https://github.com/Ten0/serde_avro_fast/blob/76158f5ab1c448e71f818185c0be7fca92246e10/src/de/deserializer/mod.rs#L49

Ten0 commented 9 months ago

Resolved by 9ec0ade4c32bdd9a2a85b1fedf5b751f87262040