[ 
https://issues.apache.org/jira/browse/AVRO-1279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13609325#comment-13609325
 ] 

Carl Steinbach commented on AVRO-1279:
--------------------------------------

I observed the following behavior while using Avro-C version 1.7.4:

{code}
% avropipe PrimitiveTypesNoCodec.avro 
Segmentation fault: 11

% avropipe PrimitiveTypes.avro 
/       []
...

% avro getmeta PrimitiveTypesNoCodec.avro 
avro.schema     ...

% avro getmeta PrimitiveTypes.avro 
avro.codec      null
avro.schema     ...
{code}

The only difference between the two avro files is that 
PrimitiveTypesNoCodec.avro
does not include an avro.codec key in it's file header. According to the spec 
this
should be fine since avro.codec is not listed as a required header field.

The offending code is located in file_read_header:

{code}
rval = avro_value_get_by_name(&meta, "avro.codec", &codec_val, NULL);
if (rval) {
        avro_set_error("File header doesn't contain a codec");
        avro_value_decref(&meta);
        return rval;
}
{code}

                
> Avro-C: file_read_header() segfaults when avro.codec is not defined
> -------------------------------------------------------------------
>
>                 Key: AVRO-1279
>                 URL: https://issues.apache.org/jira/browse/AVRO-1279
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.7.4
>            Reporter: Carl Steinbach
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to