[
https://issues.apache.org/jira/browse/MINDEXER-28?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17965278#comment-17965278
]
Olivier Lamy commented on MINDEXER-28:
--------------------------------------
This project has moved from Jira to GitHub Issues. This issue was migrated to
[apache/maven-indexer#459|https://github.com/apache/maven-indexer/issues/459].
> OOME when fed garbage
> ---------------------
>
> Key: MINDEXER-28
> URL: https://issues.apache.org/jira/browse/MINDEXER-28
> Project: Maven Indexer (Moved to GitHub Issues)
> Issue Type: Bug
> Affects Versions: 4.0.0
> Environment: JDK 6u24 on Ubuntu x86
> Reporter: Jesse N. Glick
> Priority: Minor
> Fix For: 4.1.1
>
>
> See http://netbeans.org/bugzilla/show_bug.cgi?id=197988#c1 for background.
> Without the fix of MINDEXER-20 in place, the indexer will throw an
> {{OutOfMemoryError}} when given http://www.jasperforge.org/maven2/.index/
> since that site serves junk HTML with a 200 HTTP status.
> Since the code allocates an array whose length is a 32-bit int taken from an
> unverified source, it would be best to somehow handle the case that a random
> large number is read and an OOME is thrown - perhaps rethrowing as an
> {{IOException}}.
> MINDEXER-20 should prevent the bug precondition from being triggered nearly
> as often, but the input could randomly happen to begin with 0x01.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)