]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Add deprecate flag for the functions which has a replace function in safe...
authorEric Dong <eric.dong@intel.com>
Mon, 15 Dec 2014 10:05:42 +0000 (10:05 +0000)
committerydong10 <ydong10@Edk2>
Mon, 15 Dec 2014 10:05:42 +0000 (10:05 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16521 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Library/BaseLib.h
MdePkg/Library/BaseLib/String.c

index d65b01adf65b62309b4819595483f66979c8f0f0..bd3f9cfc601fefbdbe6e69423859c6033a504e48 100644 (file)
@@ -481,7 +481,11 @@ AsciiStrnCatS (
   );\r
 \r
 \r
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
+\r
 /**\r
+  [ATTENTION] This function will be deprecated for security reason.\r
+\r
   Copies one Null-terminated Unicode string to another Null-terminated Unicode\r
   string and returns the new Unicode string.\r
 \r
@@ -513,6 +517,8 @@ StrCpy (
 \r
 \r
 /**\r
+  [ATTENTION] This function will be deprecated for security reason.\r
+\r
   Copies up to a specified length from one Null-terminated Unicode string to \r
   another Null-terminated Unicode string and returns the new Unicode string.\r
 \r
@@ -549,7 +555,7 @@ StrnCpy (
   IN      CONST CHAR16              *Source,\r
   IN      UINTN                     Length\r
   );\r
-\r
+#endif\r
 \r
 /**\r
   Returns the length of a Null-terminated Unicode string.\r
@@ -677,7 +683,11 @@ StrnCmp (
   );\r
 \r
 \r
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
+\r
 /**\r
+  [ATTENTION] This function will be deprecated for security reason.\r
+\r
   Concatenates one Null-terminated Unicode string to another Null-terminated\r
   Unicode string, and returns the concatenated Unicode string.\r
 \r
@@ -718,6 +728,8 @@ StrCat (
 \r
 \r
 /**\r
+  [ATTENTION] This function will be deprecated for security reason.\r
+\r
   Concatenates up to a specified length one Null-terminated Unicode to the end \r
   of another Null-terminated Unicode string, and returns the concatenated \r
   Unicode string.\r
@@ -762,6 +774,7 @@ StrnCat (
   IN      CONST CHAR16              *Source,\r
   IN      UINTN                     Length\r
   );\r
+#endif\r
 \r
 /**\r
   Returns the first occurrence of a Null-terminated Unicode sub-string\r
@@ -1000,7 +1013,11 @@ UnicodeStrToAsciiStr (
   );\r
 \r
 \r
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
+\r
 /**\r
+  [ATTENTION] This function will be deprecated for security reason.\r
+\r
   Copies one Null-terminated ASCII string to another Null-terminated ASCII\r
   string and returns the new ASCII string.\r
 \r
@@ -1030,6 +1047,8 @@ AsciiStrCpy (
 \r
 \r
 /**\r
+  [ATTENTION] This function will be deprecated for security reason.\r
+\r
   Copies up to a specified length one Null-terminated ASCII string to another \r
   Null-terminated ASCII string and returns the new ASCII string.\r
 \r
@@ -1063,7 +1082,7 @@ AsciiStrnCpy (
   IN      CONST CHAR8               *Source,\r
   IN      UINTN                     Length\r
   );\r
-\r
+#endif\r
 \r
 /**\r
   Returns the length of a Null-terminated ASCII string.\r
@@ -1223,7 +1242,11 @@ AsciiStrnCmp (
   );\r
 \r
 \r
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
+\r
 /**\r
+  [ATTENTION] This function will be deprecated for security reason.\r
+\r
   Concatenates one Null-terminated ASCII string to another Null-terminated\r
   ASCII string, and returns the concatenated ASCII string.\r
 \r
@@ -1259,6 +1282,8 @@ AsciiStrCat (
 \r
 \r
 /**\r
+  [ATTENTION] This function will be deprecated for security reason.\r
+\r
   Concatenates up to a specified length one Null-terminated ASCII string to \r
   the end of another Null-terminated ASCII string, and returns the \r
   concatenated ASCII string.\r
@@ -1301,7 +1326,7 @@ AsciiStrnCat (
   IN      CONST CHAR8               *Source,\r
   IN      UINTN                     Length\r
   );\r
-\r
+#endif\r
 \r
 /**\r
   Returns the first occurrence of a Null-terminated ASCII sub-string\r
index 9505c5b21ecb210f39fd51fa8472ec418f68fdae..92992a5d27e0994ab50e41d6778b233c7974a773 100644 (file)
 \r
 #include "BaseLibInternals.h"\r
 \r
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
 \r
 /**\r
+  [ATTENTION] This function will be deprecated for security reason.\r
+\r
   Copies one Null-terminated Unicode string to another Null-terminated Unicode\r
   string and returns the new Unicode string.\r
 \r
@@ -68,6 +71,8 @@ StrCpy (
 }\r
 \r
 /**\r
+  [ATTENTION] This function will be deprecated for security reason.\r
+\r
   Copies up to a specified length from one Null-terminated Unicode string  to \r
   another Null-terminated Unicode string and returns the new Unicode string.\r
 \r
@@ -137,6 +142,7 @@ StrnCpy (
   ZeroMem (Destination, Length * sizeof (*Destination));\r
   return ReturnValue;\r
 }\r
+#endif\r
 \r
 /**\r
   Returns the length of a Null-terminated Unicode string.\r
@@ -319,7 +325,11 @@ StrnCmp (
   return *FirstString - *SecondString;\r
 }\r
 \r
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
+\r
 /**\r
+  [ATTENTION] This function will be deprecated for security reason.\r
+\r
   Concatenates one Null-terminated Unicode string to another Null-terminated\r
   Unicode string, and returns the concatenated Unicode string.\r
 \r
@@ -369,6 +379,8 @@ StrCat (
 }\r
 \r
 /**\r
+  [ATTENTION] This function will be deprecated for security reason.\r
+\r
   Concatenates up to a specified length one Null-terminated Unicode to the end \r
   of another Null-terminated Unicode string, and returns the concatenated \r
   Unicode string.\r
@@ -427,6 +439,7 @@ StrnCat (
   ASSERT (StrSize (Destination) != 0);\r
   return Destination;\r
 }\r
+#endif\r
 \r
 /**\r
   Returns the first occurrence of a Null-terminated Unicode sub-string\r
@@ -1065,8 +1078,11 @@ UnicodeStrToAsciiStr (
   return ReturnValue;\r
 }\r
 \r
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
 \r
 /**\r
+  [ATTENTION] This function will be deprecated for security reason.\r
+\r
   Copies one Null-terminated ASCII string to another Null-terminated ASCII\r
   string and returns the new ASCII string.\r
 \r
@@ -1116,6 +1132,8 @@ AsciiStrCpy (
 }\r
 \r
 /**\r
+  [ATTENTION] This function will be deprecated for security reason.\r
+\r
   Copies up to a specified length one Null-terminated ASCII string to another \r
   Null-terminated ASCII string and returns the new ASCII string.\r
 \r
@@ -1181,6 +1199,7 @@ AsciiStrnCpy (
   ZeroMem (Destination, Length * sizeof (*Destination));\r
   return ReturnValue;\r
 }\r
+#endif\r
 \r
 /**\r
   Returns the length of a Null-terminated ASCII string.\r
@@ -1462,7 +1481,11 @@ AsciiStrnCmp (
   return *FirstString - *SecondString;\r
 }\r
 \r
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
+\r
 /**\r
+  [ATTENTION] This function will be deprecated for security reason.\r
+\r
   Concatenates one Null-terminated ASCII string to another Null-terminated\r
   ASCII string, and returns the concatenated ASCII string.\r
 \r
@@ -1507,6 +1530,8 @@ AsciiStrCat (
 }\r
 \r
 /**\r
+  [ATTENTION] This function will be deprecated for security reason.\r
+\r
   Concatenates up to a specified length one Null-terminated ASCII string to \r
   the end of another Null-terminated ASCII string, and returns the \r
   concatenated ASCII string.\r
@@ -1563,6 +1588,7 @@ AsciiStrnCat (
   ASSERT (AsciiStrSize (Destination) != 0);\r
   return Destination;\r
 }\r
+#endif\r
 \r
 /**\r
   Returns the first occurrence of a Null-terminated ASCII sub-string\r