avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carl Steinbach (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1279) Avro-C: file_read_header() segfaults when avro.codec is not defined
Date Thu, 21 Mar 2013 19:13:15 GMT

    [ 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:

% avropipe PrimitiveTypesNoCodec.avro 
Segmentation fault: 11

% avropipe PrimitiveTypes.avro 
/	[]

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

% avro getmeta PrimitiveTypes.avro 
avro.codec	null
avro.schema	...

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:

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

> 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

View raw message