]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c
ShellPkg: Use safe string functions to refine code.
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / SmbiosView / QueryTable.c
index 700592d2630c64f61c46338ab6b7900d49023f74..dd878c4cb7fc2b4677001861464ea00e9d63f34c 100644 (file)
@@ -2,7 +2,7 @@
   Build a table, each item is (Key, Info) pair.\r
   And give a interface of query a string out of a table.\r
 \r
-  Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -469,7 +469,7 @@ TABLE_ITEM  ProcessorUpgradeTable[] = {
   },\r
   {\r
     0x24,\r
-    L"Socket BGA1155"\r
+    L"Socket LGA1155"\r
   },\r
   {\r
     0x25,\r
@@ -494,6 +494,14 @@ TABLE_ITEM  ProcessorUpgradeTable[] = {
   {\r
     0x2A,\r
     L"Socket FM2"\r
+  },\r
+  {\r
+    0x2B,\r
+    L"Socket LGA2011-3"\r
+  },\r
+  {\r
+    0x2C,\r
+    L"Socket LGA1356-3"\r
   }\r
 };\r
 \r
@@ -2710,11 +2718,11 @@ TABLE_ITEM  CoolingDeviceTypeTable[] = {
     L" Integrated Refrigeration "\r
   },\r
   {\r
-    0x0A,\r
+    0x10,\r
     L" Active Cooling "\r
   },\r
   {\r
-    0x0B,\r
+    0x11,\r
     L" Passive Cooling "\r
   },\r
 };\r
@@ -3221,13 +3229,13 @@ QueryTable (
     //\r
     if ((High > Low && Key >= Low && Key <= High) \r
       || (Table[Index].Key == Key)) {\r
-      StrnCpy (Info, Table[Index].Info, InfoLen-1);\r
-      StrnCat (Info, L"\n", InfoLen - 1 - StrLen(Info));\r
+      StrCpyS (Info, InfoLen, Table[Index].Info);\r
+      StrCatS (Info, InfoLen, L"\n");\r
       return Key;\r
     }\r
   }\r
 \r
-  StrnCpy (Info, L"Undefined Value\n", InfoLen - 1);\r
+  StrCpyS (Info, InfoLen, L"Undefined Value\n");\r
   return QUERY_TABLE_UNFOUND;\r
 }\r
 \r