Fabio Carneiro created AVRO-4246:
------------------------------------

             Summary: Memory Leak in avroc on failed decoding
                 Key: AVRO-4246
                 URL: https://issues.apache.org/jira/browse/AVRO-4246
             Project: Apache Avro
          Issue Type: Bug
          Components: c
    Affects Versions: 1.12.1
         Environment: On any installation of the avroc library that attempts to 
decode an incorrectly encoded string.
            Reporter: Fabio Carneiro


The _read_string_ and _read_bytes_ functions in the _binary_encoding.c_ 
translation unit does not free the allocated buffer if an error results from a 
call to _read_value_ originating from the _AVRO_READ_ macro.

 

My plan to fix the is to introduce a new macro called _AVRO_READ_OR_FREE_ (name 
up for change) that frees the buffer in case of error.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to