szaszm commented on a change in pull request #1028:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1028#discussion_r595277807



##########
File path: extensions/standard-processors/processors/ExtractText.cpp
##########
@@ -126,22 +125,22 @@ int64_t ExtractText::ReadCallback::process(const 
std::shared_ptr<io::BaseStream>
   if (sizeLimitStr.empty())
     size_limit = DEFAULT_SIZE_LIMIT;
   else if (sizeLimitStr != "0")
-    size_limit = std::stoi(sizeLimitStr);
+    size_limit = gsl::narrow_cast<size_t>(std::stoi(sizeLimitStr));

Review comment:
       It comes from the user and negative numbers shouldn't crash the program, 
but they are not "valid" either.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to