Switch to using memcmp instead of strncmp
I introduced strncmp in http://https://github.com/bazelbuild/bazel/commit/feca25daffe5f294dfdf407bb924190d8116b012. The hand-rolled cookie logic should be replaced and conversations with the blaze team have started around that.
PiperOrigin-RevId: 233458738
diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc
index 98592a0..e38a5a0 100644
--- a/src/main/cpp/blaze.cc
+++ b/src/main/cpp/blaze.cc
@@ -1591,7 +1591,7 @@
if (cookie_length != cookieB.size()) {
return false;
}
- return strncmp(cookieA.c_str(), cookieB.c_str(), cookie_length) == 0;
+ return memcmp(cookieA.c_str(), cookieB.c_str(), cookie_length) == 0;
}
GrpcBlazeServer::GrpcBlazeServer(int connect_timeout_secs) {