string: Revise SAL for strnlen

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2023-07-03 13:56:24 +02:00
parent 7731a20f56
commit 556d5a9798

View File

@ -165,7 +165,7 @@ namespace stdex
/// \return Number of characters excluding zero terminator in the string. /// \return Number of characters excluding zero terminator in the string.
/// ///
template <class T> template <class T>
inline size_t strnlen(_In_z_ const T* str, _In_ size_t count) inline size_t strnlen(_In_reads_or_z_opt_(count) const T* str, _In_ size_t count)
{ {
assert(str); assert(str);
size_t i; size_t i;