This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new a85cff72df Fix nonnull warning in uri_signing unit tests (#12614)
a85cff72df is described below

commit a85cff72dff23061249a48920db75279e755cb9c
Author: Bryan Call <[email protected]>
AuthorDate: Mon Nov 17 10:53:08 2025 -0800

    Fix nonnull warning in uri_signing unit tests (#12614)
---
 .../experimental/uri_signing/unit_tests/uri_signing_test.cc  | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/plugins/experimental/uri_signing/unit_tests/uri_signing_test.cc 
b/plugins/experimental/uri_signing/unit_tests/uri_signing_test.cc
index fdfca52cd2..0672c52245 100644
--- a/plugins/experimental/uri_signing/unit_tests/uri_signing_test.cc
+++ b/plugins/experimental/uri_signing/unit_tests/uri_signing_test.cc
@@ -225,9 +225,15 @@ jws_parsing_helper(const char *uri, const char *paramName, 
const char *expected_
   cjose_jws_t *jws = get_jws_from_uri(uri, uri_ct, paramName, uri_strip, 
uri_ct, &strip_ct);
   if (jws) {
     resp = true;
-    if (strcmp(uri_strip, expected_strip) != 0) {
-      cjose_jws_release(jws);
-      resp = false;
+    if (expected_strip != nullptr) {
+      if (strcmp(uri_strip, expected_strip) != 0) {
+        resp = false;
+      }
+    } else {
+      // expected_strip == nullptr means we expect uri_strip to be empty
+      if (uri_strip[0] != '\0') {
+        resp = false;
+      }
     }
   } else {
     resp = false;

Reply via email to