You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/02/02 17:04:17 UTC

[GitHub] [nifi-minifi-cpp] fgerlits commented on a change in pull request #989: MINIFICPP-1470 ByteArrayCallback: avoid OOB indexing

fgerlits commented on a change in pull request #989:
URL: https://github.com/apache/nifi-minifi-cpp/pull/989#discussion_r568772103



##########
File path: libminifi/include/utils/ByteArrayCallback.h
##########
@@ -51,22 +51,24 @@ class ByteInputCallBack : public InputStreamCallback {
       stream->read(reinterpret_cast<uint8_t*>(vec.data()), gsl::narrow<int>(stream->size()));
     }
 
-    ptr = reinterpret_cast<char*>(&vec[0]);
+    ptr = vec.data();

Review comment:
       Do we even need this `ptr`?  It seems to be write-only.




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