[ 
https://issues.apache.org/jira/browse/COMPRESS-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12867156#action_12867156
 ] 

Sebb commented on COMPRESS-113:
-------------------------------

The code will work OK for valid input, but an invalid file could have 12 octal 
digits.

Possible solutions:
- ignore the trailing byte when converting
- change the parsing routine to insist on a trailing space or NUL for all 
numeric fields.

> TarArchiveEntry.parseTarHeader() includes the trailing space/NUL when parsing 
> the octal size
> --------------------------------------------------------------------------------------------
>
>                 Key: COMPRESS-113
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-113
>             Project: Commons Compress
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Sebb
>             Fix For: 1.1
>
>
> TarArchiveEntry.parseTarHeader() includes the trailing space/NUL when parsing 
> the octal size.
> Although the size field in the header is 12 bytes, the last byte is supposed 
> to be space or NUL - i.e. only 11 octal digits are allowed for the size.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to