[PATCH] D114342: ConvertUTF, new wrapper API

Aaron Ballman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 24 16:39:10 PST 2022


aaron.ballman added reviewers: cor3ntin, tahonermann.
aaron.ballman added a comment.

Adding some more Unicode folks to the reviewers just in case, but I think this is reasonable.



================
Comment at: llvm/lib/Support/ConvertUTFWrapper.cpp:148
+  // Avoid OOB by returning early on empty input.
+  if (SrcBytes.empty())
+    return true;
----------------
Bigcheese wrote:
> I believe this actually needs an additional check that that `SrcBytes.size()` is `< 4` and return false.
Should we be testing that the input array length is a multiple of 4 as well?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114342/new/

https://reviews.llvm.org/D114342



More information about the llvm-commits mailing list