coverity: protect against buffer overflow
Change-Id: Ibf56341b2e52d341ba06708c232947db5191a486
This commit is contained in:
@@ -431,7 +431,8 @@ char* NSP_getProductName()
|
||||
(NULL == (pEnd = strchr( pStart, '\r' ))))
|
||||
continue;
|
||||
*pEnd = 0;
|
||||
strcpy(productName, pStart);
|
||||
if (static_cast<size_t>(pEnd - pStart) <= sizeof(productName))
|
||||
strcpy(productName, pStart);
|
||||
}
|
||||
fclose(fp);
|
||||
if ((*productName == 0) ||
|
||||
|
Reference in New Issue
Block a user