summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-03-30 19:33:03 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-03-30 19:33:03 +0000
commit33c031ee2092282a069ce07d30202082ceaf61fe (patch)
treeaf76c06a5c4f476e9dfe23096ff2bc0295beaee1 /ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h
parent6b825919f1c16b07b5cac7fc5e298fbeb530d888 (diff)
downloadedk2-33c031ee2092282a069ce07d30202082ceaf61fe.tar.gz
edk2-33c031ee2092282a069ce07d30202082ceaf61fe.tar.bz2
edk2-33c031ee2092282a069ce07d30202082ceaf61fe.zip
pointer verification (not NULL) and buffer overrun fixes.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11459 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h
index adacc41cf3..1022132f10 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h
@@ -2,7 +2,7 @@
Build a table, each item is (key, info) pair.
and give a interface of query a string out of a table.
- Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -37,12 +37,37 @@ typedef struct TABLE_ITEM {
} \
} while (0);
+/**
+ Given a table and a Key, return the responding info.
+
+ Notes:
+ Table[Index].Key is change from UINT8 to UINT16,
+ in order to deal with "0xaa - 0xbb".
+
+ For example:
+ DisplaySELVariableDataFormatTypes(UINT8 Type, UINT8 Option)
+ has a item:
+ "0x07-0x7F, Unused"
+ Now define Key = 0x7F07, that is to say: High = 0x7F, Low = 0x07.
+ Then all the Key Value between Low and High gets the same string
+ L"Unused".
+
+ @param[in] Table The begin address of table.
+ @param[in] Number The number of table items.
+ @param[in] Key The query Key.
+ @param[in,out] Info Input as empty buffer; output as data buffer.
+ @param[in] InfoLen The max number of characters for Info.
+
+ @return the found Key and Info is valid.
+ @retval QUERY_TABLE_UNFOUND and Info should be NULL.
+**/
UINT8
QueryTable (
IN TABLE_ITEM *Table,
IN UINTN Number,
IN UINT8 Key,
- IN OUT CHAR16 *Info
+ IN OUT CHAR16 *Info,
+ IN UINTN InfoLen
);
VOID