You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Loyal-Young (via GitHub)" <gi...@apache.org> on 2026/09/28 11:37:29 UTC

[I] [Bug] Malformed hexadecimal identifiers are silently decoded [rocketmq]

Loyal-Young opened a new issue, #11256:
URL: https://github.com/apache/rocketmq/issues/11256

   ### Before Creating the Bug Report
   
   - [x] I inspected the current develop code and searched related issues/open pull requests.
   
   ### Summary
   
   UtilAll.string2bytes silently drops a trailing nibble in odd-length input and maps non-hex characters through -1 into arbitrary bytes. Message identifier parsers can therefore operate on corrupted address/offset data instead of rejecting malformed input.
   
   ### Steps to Reproduce
   
   string2bytes("ABC") silently truncates; string2bytes("G0") produces data rather than rejecting the input.
   
   ### Expected Behavior
   
   Validate even length and both ASCII hexadecimal nibbles before decoding; preserve mixed-case and null/empty compatibility.
   
   ### Environment / Additional Context
   
   - Reproduced against develop commit `78b96bc5e21216cd7896efae08f90c5cde4cae53`.
   - Regression test: `UtilAllHexTest`.
   - The regression fails before the fix and passes afterward on JDK 8.
   - Proposed change is limited to the existing implementation; no protocol or new API is introduced.
   
   


-- 
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: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org