avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thiruvalluvan M. G. (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AVRO-1097) BinaryDecoder does not detect EOF sometimes
Date Mon, 21 May 2012 05:39:40 GMT
Thiruvalluvan M. G. created AVRO-1097:

             Summary: BinaryDecoder does not detect EOF sometimes
                 Key: AVRO-1097
                 URL: https://issues.apache.org/jira/browse/AVRO-1097
             Project: Avro
          Issue Type: Bug
          Components: java
            Reporter: Thiruvalluvan M. G.
            Assignee: Thiruvalluvan M. G.
             Fix For: 1.7.0

This is the first problem reported in AVRO-1058.

The trouble is, in case of end of stream, ensureBounds() does not really ensure that the requisite
number of actual bytes are available in the buffer. It merely ensures that there won't be
array index overflow. readInt() and readLong() check for overflow at the very end. But these
two methods continue to read whatever bytes are in the buffer and interpret. If the bytes
do not really belong to the stream (because of EOF), they need not be valid Zigzag encoding.
That is the reason we get the "Invalid int encoding" exception.

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