diff options
author | Star Zeng <star.zeng@intel.com> | 2016-06-15 16:22:34 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-07-07 14:08:36 +0800 |
commit | adccd38663ea5e21f348ab448e44d9ab0254775d (patch) | |
tree | 619b35b818b19b2e8142c6a1a958f3214a17e4ab | |
parent | faaa92b7eaf9727db297b71c64cc5e0569b74ccd (diff) | |
download | edk2-platforms-adccd38663ea5e21f348ab448e44d9ab0254775d.tar.xz |
MdePkg: Indicate UnicodeStrToAsciiStr/AsciiStrToUnicodeStr to be deprecated
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
(cherry picked from commit 415aa2f1cb915a00b2d91fdfb1798bb75bcaed09)
-rw-r--r-- | MdePkg/Include/Library/BaseLib.h | 11 | ||||
-rw-r--r-- | MdePkg/Library/BaseLib/String.c | 11 |
2 files changed, 20 insertions, 2 deletions
diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h index 2f375377f4..cf24ba925c 100644 --- a/MdePkg/Include/Library/BaseLib.h +++ b/MdePkg/Include/Library/BaseLib.h @@ -984,7 +984,11 @@ StrHexToUint64 ( IN CONST CHAR16 *String
);
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
+
/**
+ [ATTENTION] This function is deprecated for security reason.
+
Convert a Null-terminated Unicode string to a Null-terminated
ASCII string and returns the ASCII string.
@@ -1024,6 +1028,8 @@ UnicodeStrToAsciiStr ( OUT CHAR8 *Destination
);
+#endif
+
/**
Convert a Null-terminated Unicode string to a Null-terminated
ASCII string.
@@ -1575,8 +1581,11 @@ AsciiStrHexToUint64 ( IN CONST CHAR8 *String
);
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
/**
+ [ATTENTION] This function is deprecated for security reason.
+
Convert one Null-terminated ASCII string to a Null-terminated
Unicode string and returns the Unicode string.
@@ -1610,6 +1619,8 @@ AsciiStrToUnicodeStr ( OUT CHAR16 *Destination
);
+#endif
+
/**
Convert one Null-terminated ASCII string to a Null-terminated
Unicode string.
diff --git a/MdePkg/Library/BaseLib/String.c b/MdePkg/Library/BaseLib/String.c index 92992a5d27..07c0562f3b 100644 --- a/MdePkg/Library/BaseLib/String.c +++ b/MdePkg/Library/BaseLib/String.c @@ -1000,7 +1000,11 @@ InternalAsciiIsHexaDecimalDigitCharacter ( (Char >= 'a' && Char <= 'f'));
}
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
+
/**
+ [ATTENTION] This function is deprecated for security reason.
+
Convert a Null-terminated Unicode string to a Null-terminated
ASCII string and returns the ASCII string.
@@ -1078,8 +1082,6 @@ UnicodeStrToAsciiStr ( return ReturnValue;
}
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
/**
[ATTENTION] This function will be deprecated for security reason.
@@ -1986,8 +1988,11 @@ AsciiStrHexToUint64 ( return Result;
}
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
/**
+ [ATTENTION] This function is deprecated for security reason.
+
Convert one Null-terminated ASCII string to a Null-terminated
Unicode string and returns the Unicode string.
@@ -2054,6 +2059,8 @@ AsciiStrToUnicodeStr ( return ReturnValue;
}
+#endif
+
/**
Converts an 8-bit value to an 8-bit BCD value.
|