mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-16 19:14:41 -07:00
Return empty string when can't take slice for snippet from buffer
This commit is contained in:
@@ -663,7 +663,7 @@ parseErr:
|
||||
func protoSnippet(start int, buf []byte) string {
|
||||
stop := start + PROTO_SNIPPET_SIZE
|
||||
bufSize := len(buf)
|
||||
if start == bufSize {
|
||||
if start <= bufSize {
|
||||
return ""
|
||||
}
|
||||
if stop > bufSize {
|
||||
|
||||
Reference in New Issue
Block a user