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:21:35 UTC

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

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



##########
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:
       I didn't check it, but you're right, it's unused. Removing it.




----------------------------------------------------------------
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