avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Douglas Creager (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-980) C: avro_schema_from_json ignores length parameter
Date Tue, 20 Dec 2011 20:11:30 GMT

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

Douglas Creager commented on AVRO-980:

Maybe we can assume a NUL-terminated string if the caller passes in 0 for the length parameter?
> C: avro_schema_from_json ignores length parameter 
> --------------------------------------------------
>                 Key: AVRO-980
>                 URL: https://issues.apache.org/jira/browse/AVRO-980
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.6.1
>         Environment: Linux x86_64 (Ubuntu 11.10)
> Avro 1.6.1
> GCC 4.6.1
> cmake 2.8.5
>            Reporter: Michael Cooper
>            Priority: Minor
>              Labels: c, schema
>         Attachments: 0001-AVRO-980.-C-Handle-length-parameter-in-avro_schema_f.patch
> The function avro_schema_from_json() takes in a const char* and a length parameter, but
it appears that the length parameter is ignored.
> We have a project where the schema is a binary resource compiled into the executable,
and is not guaranteed to have a null terminator at the end.
> This did not appear to be an issue because the function had a length parameter.
> The other day, It kept throwing errors about characters that were not in the file at
> Suspecting it was running off the end of the file, I had a look at the Avro-C code and
found that even though the function takes in a length parameter, it does not use it and expects
a null terminator.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message