You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by mi...@apache.org on 2019/01/18 08:54:31 UTC
[activemq-artemis] 02/04: NO-JIRA Fix possible IOE
This is an automated email from the ASF dual-hosted git repository.
michaelpearce pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit f49d3e89dcbb961eeb34fee4edf2bd0e812a76b6
Author: Michael André Pearce <mi...@me.com>
AuthorDate: Fri Jan 18 08:20:14 2019 +0000
NO-JIRA Fix possible IOE
id must be less than values.length, values[id] array access might be out of bounds, as the index might be equal to the array length.
---
.../java/org/apache/activemq/artemis/core/persistence/QueueStatus.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/QueueStatus.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/QueueStatus.java
index 18fa9b9..f4a8bdd 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/QueueStatus.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/QueueStatus.java
@@ -37,7 +37,7 @@ public enum QueueStatus {
}
public static QueueStatus fromID(short id) {
- if (id < 0 || id > values.length) {
+ if (id < 0 || id >= values.length) {
return null;
} else {
return values[id];