diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-27 15:49:22 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-27 15:49:22 -0800 |
commit | e133a9824695d0286ca7717b1eb6a1c57748b898 (patch) | |
tree | fc18dc3ed32b589ce1a8c9c7c67b36922fc86536 | |
parent | 9e2ba40d13cd03525ce137435fd817a55758bc8c (diff) |
CID-227
Checker: STRING_OVERFLOW
Function: CProcessor::AnalyzeIntelProcessor()
File: /indra/llcommon/llprocessor.cpp
-rw-r--r-- | indra/llcommon/llprocessor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index 469e544b16..8a4a4a8f9a 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -281,7 +281,8 @@ bool CProcessor::AnalyzeIntelProcessor() // already have a string here from GetCPUInfo(). JC if ( CPUInfo.uiBrandID < LL_ARRAY_SIZE(INTEL_BRAND) ) { - strcpy(CPUInfo.strBrandID, INTEL_BRAND[CPUInfo.uiBrandID]); + strncpy(CPUInfo.strBrandID, INTEL_BRAND[CPUInfo.uiBrandID], sizeof(CPUInfo.strBrandID)-1); + CPUInfo.strBrandID[sizeof(CPUInfo.strBrandID)-1]='\0'; if (CPUInfo.uiBrandID == 3 && CPUInfo.uiModel == 6) { |