You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2008/01/17 08:44:34 UTC
[jira] Created: (VFS-191) Bad integer comparison in
CBZip2InputStream
Bad integer comparison in CBZip2InputStream
-------------------------------------------
Key: VFS-191
URL: https://issues.apache.org/jira/browse/VFS-191
Project: Commons VFS
Issue Type: Bug
Environment: Fortify
Reporter: Henri Yandell
Fix For: 1.1
There are three places where 'thech' (twice) and 'ch' (once) are compared to -1; when a char value should never be -1.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (VFS-191) Bad integer comparison in
CBZip2InputStream
Posted by "Gary Gregory (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VFS-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12682705#action_12682705 ]
Gary Gregory commented on VFS-191:
----------------------------------
Can FindBugs report this? I am wondering where else this happens, other places in Commons perhaps.
> Bad integer comparison in CBZip2InputStream
> -------------------------------------------
>
> Key: VFS-191
> URL: https://issues.apache.org/jira/browse/VFS-191
> Project: Commons VFS
> Issue Type: Bug
> Environment: Fortify
> Reporter: Henri Yandell
> Fix For: 1.1
>
>
> There are three places where 'thech' (twice) and 'ch' (once) are compared to -1; when a char value should never be -1.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (VFS-191) Bad integer comparison in
CBZip2InputStream
Posted by "Sebb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VFS-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12682704#action_12682704 ]
Sebb commented on VFS-191:
--------------------------
The code was unnecessarily using a char, so changed to use int.
commit -m "VFS-191 - replace char by int as a work variable to allow compare with -1"
Committed revision 755291.
> Bad integer comparison in CBZip2InputStream
> -------------------------------------------
>
> Key: VFS-191
> URL: https://issues.apache.org/jira/browse/VFS-191
> Project: Commons VFS
> Issue Type: Bug
> Environment: Fortify
> Reporter: Henri Yandell
> Fix For: 1.1
>
>
> There are three places where 'thech' (twice) and 'ch' (once) are compared to -1; when a char value should never be -1.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.