Skip to content

Commit

Permalink
[C++] Add overflow check in NullBuilder::AppendNull()
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkn committed Mar 17, 2019
1 parent b31315a commit 17c7c86
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cpp/src/arrow/array/builder_primitive.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class ARROW_EXPORT NullBuilder : public ArrayBuilder {

/// \brief Append a single null element
Status AppendNull() {
ARROW_RETURN_NOT_OK(CheckCapacity(length_ + 1, length_));
++null_count_;
++length_;
return Status::OK();
Expand Down

0 comments on commit 17c7c86

Please sign in to comment.