vfs: check userland buffers before reading them.
[haiku.git] / src / system / libroot / posix / string / strpbrk.c
blobb765d44e101dbe6987df7ce5c3f288619d939f82
1 /*
2 ** Copyright 2001, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
4 */
6 #include <sys/types.h>
7 #include <string.h>
10 char *
11 strpbrk(char const *cs, char const *ct)
13 const char *sc1;
14 const char *sc2;
16 for (sc1 = cs; *sc1 != '\0'; ++sc1) {
17 for (sc2 = ct; *sc2 != '\0'; ++sc2) {
18 if (*sc1 == *sc2)
19 return (char *)sc1;
23 return NULL;