File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,9 @@ struct ArrowBinaryHelper<ByteArrayType, ArrowBinaryType> {
178178
179179 Status AppendValue (const uint8_t * data, int32_t length,
180180 std::optional<int64_t > estimated_remaining_data_length = {}) {
181+ if (ARROW_PREDICT_FALSE (data == nullptr )) {
182+ return Status::Invalid (" data is nullptr" );
183+ }
181184 if (!kIsBinaryView && estimated_remaining_data_length.has_value ()) {
182185 // Assume Prepare() was already called with an estimated_data_length
183186 builder_->UnsafeAppend (data, length);
@@ -207,6 +210,9 @@ struct ArrowBinaryHelper<FLBAType, ::arrow::FixedSizeBinaryType> {
207210
208211 Status AppendValue (const uint8_t * data, int32_t length,
209212 std::optional<int64_t > estimated_remaining_data_length = {}) {
213+ if (ARROW_PREDICT_FALSE (data == nullptr )) {
214+ return Status::Invalid (" data is nullptr" );
215+ }
210216 acc_->UnsafeAppend (data);
211217 return Status::OK ();
212218 }
You can’t perform that action at this time.
0 commit comments