Back to index

glibc  2.9
mbstowcs_chk.c File Reference
#include <locale.h>
#include <string.h>
#include <wchar.h>

Go to the source code of this file.


size_t __mbstowcs_chk (wchar_t *dst, const char *src, size_t len, size_t dstlen)

Function Documentation

size_t __mbstowcs_chk ( wchar_t *  dst,
const char *  src,
size_t  len,
size_t  dstlen 

Definition at line 25 of file mbstowcs_chk.c.

  if (__builtin_expect (dstlen < len, 0))
    __chk_fail ();

  mbstate_t state;

  memset (&state, '\0', sizeof state);
  /* Return how many we wrote (or maybe an error).  */
  return __mbsrtowcs (dst, &src, len, &state);

Here is the call graph for this function:

Here is the caller graph for this function: