Back to index

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

Go to the source code of this file.


size_t __wcstombs_chk (char *dst, __const wchar_t *src, size_t len, size_t dstlen)

Function Documentation

size_t __wcstombs_chk ( char *  dst,
__const wchar_t *  src,
size_t  len,
size_t  dstlen 

Definition at line 25 of file wcstombs_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 __wcsrtombs (dst, &src, len, &state);

Here is the call graph for this function:

Here is the caller graph for this function: