vfs: check userland buffers before reading them.
[haiku.git] / src / system / libroot / posix / wchar / wcschrnul.c
blob589d829f3ce605f567e49b51c86a9041c85d41b2
1 /*
2 ** Copyright 2011, Oliver Tappe, zooey@hirschkaefer.de. All rights reserved.
3 ** Distributed under the terms of the Haiku License.
4 */
6 #include <wchar_private.h>
9 wchar_t*
10 __wcschrnul(const wchar_t* wcs, wchar_t wc)
12 while (*wcs != L'\0' && *wcs != wc)
13 wcs++;
15 return (wchar_t*)wcs;
19 B_DEFINE_WEAK_ALIAS(__wcschrnul, wcschrnul);