bakaid commented on a change in pull request #731: MINIFICPP-1096 fix
BackTrace, OOB indexing, tests, appveyor reporting
URL: https://github.com/apache/nifi-minifi-cpp/pull/731#discussion_r385233811
##########
File path: extensions/standard-processors/processors/ExtractText.cpp
##########
@@ -212,10 +213,10 @@ int64_t
ExtractText::ReadCallback::process(std::shared_ptr<io::BaseStream> strea
}
ExtractText::ReadCallback::ReadCallback(std::shared_ptr<core::FlowFile>
flowFile, core::ProcessContext *ctx, std::shared_ptr<logging::Logger> lgr)
- : flowFile_(flowFile),
+ : flowFile_(std::move(flowFile)),
ctx_(ctx),
- logger_(lgr) {
- buffer_.reserve(std::min<uint64_t>(flowFile->getSize(), MAX_BUFFER_SIZE));
+ logger_(std::move(lgr)) {
+ buffer_.resize(std::min<uint64_t>(flowFile_->getSize(), MAX_BUFFER_SIZE));
Review comment:
👍
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services