Mikhail Titov created ARTEMIS-5690:
--------------------------------------

             Summary: ArrayIndexOutOfBoundsException in SimpleString - 
getChars() method
                 Key: ARTEMIS-5690
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5690
             Project: ActiveMQ Artemis
          Issue Type: Bug
    Affects Versions: 2.31.2, 2.43.0
         Environment: openjdk version "21.0.8" 2025-07-15
            Reporter: Mikhail Titov


I have found an ArrayIndexOutOfBoundsException bug as a result of fuzz-testing 
SimpleString - getChars() method. 

Run the following code to reproduce:
{code:java}
import org.apache.activemq.artemis.api.core.SimpleString;
 
import java.util.Base64;
 
public class ArrayIndexOutOfBoundsBug {
 
    public static void main(String[] args) {
 
        String Base64String = "AA==";
        Base64.Decoder decoder = Base64.getDecoder();
 
        String str = new String(decoder.decode(Base64String));
        SimpleString simpleStr = SimpleString.of(str);
 
        simpleStr.getChars(0, 1, new char[0], 0);
    }
}{code}
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to