From 4b43b375b7abae22070cd86bfc26a8222233150e Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Wed, 31 Jan 2024 13:24:56 -0500 Subject: check for overlapping pointers --- src/string/strcspn.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/string/strcspn.c') diff --git a/src/string/strcspn.c b/src/string/strcspn.c index 19f83fda..f2e8c588 100644 --- a/src/string/strcspn.c +++ b/src/string/strcspn.c @@ -10,6 +10,7 @@ size_t strcspn(const char *s1, const char *s2) SIGNAL_SAFE(0); ASSERT_NONNULL(s1); ASSERT_NONNULL(s2); + /* no modification, overlap is OK */ for (i = 0; s1[i] != '\0'; i++) { if (strchr (s2, s1[i]) != NULL) { -- cgit v1.2.1