Prevent 'slice bounds out of range' in client.processResponse

This commit is contained in:
Dolf Schimmel (Freeaqingme)
2015-07-20 04:05:11 +02:00
parent 335a89337f
commit 7169eafd5a

View File

@@ -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