edponce commented on a change in pull request #10869:
URL: https://github.com/apache/arrow/pull/10869#discussion_r698428601
##########
File path: cpp/src/arrow/compute/kernels/scalar_string.cc
##########
@@ -496,29 +493,22 @@ template <typename Type>
using UTF8SwapCase =
StringTransformExec<Type, StringTransformCodepoint<UTF8SwapCaseTransform>>;
-struct Utf8CapitalizeTransform : public StringTransformBase {
+struct Utf8CapitalizeTransform : public StringTransformCodepointBase {
int64_t Transform(const uint8_t* input, int64_t input_string_ncodeunits,
uint8_t* output) {
uint8_t* output_start = output;
- if (input_string_ncodeunits > 0) {
Review comment:
No. Nevertheless, even with the check, `util::UTF8AdvanceCodepoints` can
buffer overflow because it is not constrained by a given size but by the
detection of an invalid code unit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]