Daniel Becker has posted comments on this change. ( http://gerrit.cloudera.org:8080/20447 )
Change subject: IMPALA-13039: AES Encryption/ Decryption Support in Impala ...................................................................... Patch Set 17: (1 comment) http://gerrit.cloudera.org:8080/#/c/20447/17/be/src/util/openssl-util.cc File be/src/util/openssl-util.cc: http://gerrit.cloudera.org:8080/#/c/20447/17/be/src/util/openssl-util.cc@405 PS17, Line 405: if (strncmp("AES_256_GCM", str, len) == 0 ) { The problem here is that any prefix, including the empty string, will match this comparison because strncmp() only compares the first 'len' characters but it doesn't compare the length. You could use std::string_view here to wrap (str, len) without copying, and use its operator==. The mode names (e.g. "AES_256_GCM") could be extracted into constant (constexpr) string_views as static class members and they could also be used in ModeToString(). -- To view, visit http://gerrit.cloudera.org:8080/20447 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3902f2b1d95da4d06995cbd687e79c48e16190c9 Gerrit-Change-Number: 20447 Gerrit-PatchSet: 17 Gerrit-Owner: Pranav Lodha <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Daniel Becker <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Noemi Pap-Takacs <[email protected]> Gerrit-Reviewer: Pranav Lodha <[email protected]> Gerrit-Comment-Date: Wed, 28 Aug 2024 14:05:14 +0000 Gerrit-HasComments: Yes
