TONY: Fix buffer overrun

This commit is contained in:
Eugene Sandulenko 2016-05-04 20:46:43 +02:00
parent f6444a03d2
commit 534f723fa5

View File

@ -331,7 +331,7 @@ static const byte *parseItem(const byte *lpBuf, LpMpalItem lpmiItem) {
byte len = *lpBuf;
lpBuf++;
memcpy(lpmiItem->_lpszDescribe, lpBuf, MIN((byte)127, len));
memcpy(lpmiItem->_lpszDescribe, lpBuf, MIN((byte)MAX_DESCRIBE_SIZE, len));
lpBuf += len;
if (len >= MAX_DESCRIBE_SIZE)