Add PRESUBMIT warning that chartorune should not be used

charntorune should be used instead.

Note: libphonenumber has this impl of charntorune
(https://github.com/google/libphonenumber/blob/07294e78abb30138ad8f0771408afedf90900388/cpp/src/phonenumbers/utf/rune.c#L48)
that is explicitly memory-safe whereas the version in utf is kinda just
hard-coded to work, but actually doesn't
(https://source.chromium.org/chromium/chromium/src/+/main:third_party/utf/src/utf/chartorune.c;l=61;drc=a5fb7662f5a2c5b61c532d949678ce1c4a1dc665).

Both utf and libphonenumber have headers that declare charntorune, but
only libphonenumber's .cc is built into Chrome.

Bug: 1346675
Change-Id: I2a6527a8ce62debba85f849cf9721c89be1c4054
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3966650
Commit-Queue: Robert Ogden <robertogden@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1061327}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index a498f5a..db89961a 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -1260,6 +1260,19 @@
         _THIRD_PARTY_EXCEPT_BLINK,
       ],
     ),
+    BanRule(
+      r'\bchartorune\b',
+      (
+        'chartorune is not memory-safe, unless you can guarantee the input ',
+        'string is always null-terminated. Otherwise, please use charntorune ',
+        'from libphonenumber instead.'
+      ),
+      True,
+      [
+        _THIRD_PARTY_EXCEPT_BLINK,
+        # Exceptions to this rule should have a fuzzer.
+      ],
+    ),
 )
 
 _BANNED_MOJOM_PATTERNS : Sequence[BanRule] = (