RockteMQ-AI commented on issue #10829:
URL: https://github.com/apache/rocketmq/issues/10829#issuecomment-5225050329

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase (`develop` 
branch).
   
   **Root Cause:** `MQVersion.getVersionDesc(int)` and 
`MQVersion.value2Version(int)` check `if (value >= length)` but do not guard 
against negative values. A negative `value` causes 
`ArrayIndexOutOfBoundsException` when accessing `versions[value]`.
   
   **Impact:** Any code path passing a negative version number (e.g., from 
corrupted data or protocol error) crashes instead of returning a safe default.
   
   **Severity:** low
   
   **Affected code:** 
`common/src/main/java/org/apache/rocketmq/common/MQVersion.java`
   
   An automated fix proposal will be generated. Reply `/approve` to proceed 
with PR generation.
   
   ---
   *Automated evaluation by RockteMQ-AI*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to