__wcsncpy_chk

Name

__wcsncpy_chk -- copy a fixed-size string of wide characters, with buffer overflow checking

Synopsis

#include <wchar.h>

wchar_t * __wcsncpy_chk(wchar_t * dest, const wchar_t * src, size_t n, size_t destlen);

Description

The interface __wcsncpy_chk() shall function in the same way as the interface wcsncpy(), except that __wcsncpy_chk() shall check for buffer overflow before computing a result. If an overflow is anticipated, the function shall abort and the program calling it shall exit.

The parameter destlen specifies the size of the object pointed to by dest. If len exceeds destlen, the function shall abort and the program calling it shall exit.

The __wcsncpy_chk() function is not in the source standard; it is only in the binary standard.