media-io / yaserde

Yet Another Serializer/Deserializer
MIT License
175 stars 57 forks source link

Fix flattened fields #128

Closed Freax13 closed 2 years ago

Freax13 commented 2 years ago

This pr fixes some bugs that could cause wrong events to be written to the buffer for unused xml events. When this happens the error is quietly discarded and deserializing flattened fields no longer works.

This pr only fixes the bugs that could allow the buffer to be corrupted. We should probably emit a warning when the buffer is corrupted.

ColinFinck commented 2 years ago

@MarcAntoine-Arnaud, could you have a look at this fix?

MarcAntoine-Arnaud commented 2 years ago

Thanks you for this contribution !