SolidWallOfCode commented on a change in pull request #8638:
URL: https://github.com/apache/trafficserver/pull/8638#discussion_r796156658



##########
File path: plugins/s3_auth/aws_auth_v4.cc
##########
@@ -176,39 +176,38 @@ canonicalEncode(const String &in, bool isObjectName)
  * @param inLen input character count
  * @return pointer to the trimmed string.
  */
-std::string
+String
 trimWhiteSpacesAndSqueezeInnerSpaces(const char *in, size_t inLen)
 {
-  if (nullptr == in || inLen == 0) {
-    return std::string(in, inLen);
-  }
+  String in_str = String(in, inLen);

Review comment:
       Won't this crash if `in == nullptr`? Put a unit test in for that.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to