From 7169eafd5a99b6d7755cf9a513a9303106f9ff2f Mon Sep 17 00:00:00 2001 From: "Dolf Schimmel (Freeaqingme)" Date: Mon, 20 Jul 2015 04:05:11 +0200 Subject: [PATCH] Prevent 'slice bounds out of range' in client.processResponse --- client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.go b/client.go index 1fdb410..f2591f5 100644 --- a/client.go +++ b/client.go @@ -429,7 +429,7 @@ func processResponse(cmd string, data *bufio.Reader) (returnObj *SpamDOut, err e lineStr = string(line) //TXT Table found, prepare to parse.. - if lineStr[0:4] == TABLE_MARK { + if len(lineStr) >= 4 && lineStr[0:4] == TABLE_MARK { section := []map[string]interface{}{} tt := 0