diff options
| author | Amir Ayupov <aaupov@fb.com> | 2025-06-08 22:50:59 -0700 |
|---|---|---|
| committer | Amir Ayupov <aaupov@fb.com> | 2025-06-08 22:50:59 -0700 |
| commit | eb1dd48b4ab79e29e82bd396c01b4a7cc83bbd81 (patch) | |
| tree | ad446efb8062977bcf328af58cdc7fcd47864af2 /libc/src/string/strcasestr.cpp | |
| parent | 81f92265327a8cf6e730ad1d01fd02f4ef76ed86 (diff) | |
| parent | 03bbd04bb7ae40dcda7b8bf1d6d09f63191503b0 (diff) | |
[𝘀𝗽𝗿] changes introduced through rebaseusers/aaupov/spr/main.boltnfci-simplify-dataaggregator-using-traces-1
Created using spr 1.3.4
[skip ci]
Diffstat (limited to 'libc/src/string/strcasestr.cpp')
| -rw-r--r-- | libc/src/string/strcasestr.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/src/string/strcasestr.cpp b/libc/src/string/strcasestr.cpp index 1da1e3f02507..de8e4bec7fe0 100644 --- a/libc/src/string/strcasestr.cpp +++ b/libc/src/string/strcasestr.cpp @@ -11,6 +11,7 @@ #include "src/__support/common.h" #include "src/__support/ctype_utils.h" #include "src/__support/macros/config.h" +#include "src/__support/macros/null_check.h" #include "src/string/memory_utils/inline_strstr.h" namespace LIBC_NAMESPACE_DECL { @@ -23,6 +24,9 @@ LLVM_LIBC_FUNCTION(char *, strcasestr, return LIBC_NAMESPACE::internal::tolower(a) - LIBC_NAMESPACE::internal::tolower(b); }; + + LIBC_CRASH_ON_NULLPTR(haystack); + LIBC_CRASH_ON_NULLPTR(needle); return inline_strstr(haystack, needle, case_cmp); } |
