[
https://issues.apache.org/jira/browse/HADOOP-18471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17621257#comment-17621257
]
ASF GitHub Bot commented on HADOOP-18471:
-----------------------------------------
steveloughran commented on code in PR #4957:
URL: https://github.com/apache/hadoop/pull/4957#discussion_r1000905429
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/DefaultStringifier.java:
##########
@@ -158,6 +158,9 @@ public static <K> K load(Configuration conf, String keyName,
public static <K> void storeArray(Configuration conf, K[] items,
String keyName) throws IOException {
+ if (items.length == 0) {
+ throw new IndexOutOfBoundsException();
+ }
DefaultStringifier<K> stringifier = new DefaultStringifier<K>(conf,
GenericsUtil.getClass(items[0]));
Review Comment:
ok
> An unhandled ArrayIndexOutOfBoundsException in
> DefaultStringifier.storeArray() if provided with an empty input
> --------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-18471
> URL: https://issues.apache.org/jira/browse/HADOOP-18471
> Project: Hadoop Common
> Issue Type: Bug
> Components: common, io
> Affects Versions: 3.3.4
> Reporter: FuzzingTeam
> Priority: Minor
> Labels: pull-request-available
>
> The code throws an unhandled ArrayIndexOutOfBoundsException when method
> _storeArray_ of DefaultStringifier.java is called with an empty array as
> input.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]