Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the length is less than 24, it will cause checkMD to fail #54

Closed
magengbin opened this issue Oct 10, 2022 · 2 comments
Closed

When the length is less than 24, it will cause checkMD to fail #54

magengbin opened this issue Oct 10, 2022 · 2 comments
Assignees

Comments

@magengbin
Copy link

msg.mqmd.CorrelId = correlHexBytes

https://github.com/ibm-messaging/mq-golang/blob/b8f10b5addb40e6223f0e2d01a26a9c4377536bd/ibmmq/mqiMQMD.go#L114

Here you should use copy

	// Store the bytes form of the correlID
	copy(msg.mqmd.CorrelId, []byte(correlHexBytes))
@matrober-uk
Copy link
Member

Hi @magengbin - thanks for highlighting this issue. I'll look into reproducing the scenario in a test case and applying the fix you suggested (you're also very welcome to submit a testcase + fix in a PR yourself if you'd like, see the details in Contributing).

@matrober-uk matrober-uk self-assigned this Nov 5, 2022
matrober-uk added a commit to matrober-uk/mq-golang-jms20 that referenced this issue Nov 9, 2022
matrober-uk added a commit that referenced this issue Nov 9, 2022
Fix handling of CorrelID less than 24 characters - #54
@matrober-uk
Copy link
Member

Fixed under PR #57.
thanks for reporting the issue @magengbin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants