mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-15 18:50:41 -07:00
Merge pull request #1923 from nats-io/processMsgResults
[fixed] out of range issue in processMsgResults during subject rewrite
This commit is contained in:
@@ -3887,7 +3887,7 @@ func (c *client) processMsgResults(acc *Account, r *SublistResult, msg, deliver,
|
||||
c.kind != CLIENT && c.kind != SYSTEM && c.kind != JETSTREAM && c.kind != ACCOUNT &&
|
||||
bytes.HasPrefix(creply, []byte(jsAckPre)) {
|
||||
// We need to rewrite the subject and the reply.
|
||||
if li := bytes.LastIndex(creply, []byte("@")); li != 0 && li < len(creply)-1 {
|
||||
if li := bytes.LastIndex(creply, []byte("@")); li != -1 && li < len(creply)-1 {
|
||||
subj, creply = creply[li+1:], creply[:li]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user