]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/fuzzer/uloc_is_right_to_left_fuzzer.cpp
ICU-66108.tar.gz
[apple/icu.git] / icuSources / test / fuzzer / uloc_is_right_to_left_fuzzer.cpp
diff --git a/icuSources/test/fuzzer/uloc_is_right_to_left_fuzzer.cpp b/icuSources/test/fuzzer/uloc_is_right_to_left_fuzzer.cpp
new file mode 100644 (file)
index 0000000..fe43089
--- /dev/null
@@ -0,0 +1,15 @@
+// © 2019 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+
+#include <string>
+
+#include "locale_util.h"
+#include "unicode/uloc.h"
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+  const std::string input = MakeZeroTerminatedInput(data, size);
+
+  uloc_isRightToLeft(input.c_str());
+
+  return 0;
+}