You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2026/08/21 22:32:53 UTC

(qpid-proton) 02/02: PROTON-2960: Don't pass uncast 0 as null pointer into pn_data_fill

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

asf-gitbox-commits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git

commit caf0f45c5652d1576ca5af882fbc2be9b53800c0
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Fri Aug 21 17:12:40 2026 -0400

    PROTON-2960: Don't pass uncast 0 as null pointer into pn_data_fill
    
    Varargs requires pointers to be explicitly pointers, otherwise it'll use
    the wrong number of bits on most 64 bit ABIs.
---
 c/tests/data_test.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/c/tests/data_test.cpp b/c/tests/data_test.cpp
index 10c53ad12..b7a2c7675 100644
--- a/c/tests/data_test.cpp
+++ b/c/tests/data_test.cpp
@@ -209,21 +209,21 @@ TEST_CASE("data_described_list") {
 
   /* open frame with some fields */
   pn_data_clear(data);
-  pn_data_fill(data, "DL[SSnI]", (uint64_t)16, "container-1", 0, 965);
+  pn_data_fill(data, "DL[SSnI]", (uint64_t)16, "container-1", nullptr, 965);
   CHECK("@open(16) [container-id=\"container-1\", channel-max=965]" == inspect(data));
 
   /* Described list with items after the list */
   pn_data_clear(data);
-  pn_data_fill(data, "DL[SSnI]S", (uint64_t)16, "container-1", 0, 965, "extra");
+  pn_data_fill(data, "DL[SSnI]S", (uint64_t)16, "container-1", nullptr, 965, "extra");
   CHECK("@open(16) [container-id=\"container-1\", channel-max=965], \"extra\"" == inspect(data));
 
   /* Conditional Described list cases */
   pn_data_clear(data);
-  pn_data_fill(data, "?DL[SSnI]S", false, (uint64_t)16, "container-1", 0, 965, "extra");
+  pn_data_fill(data, "?DL[SSnI]S", false, (uint64_t)16, "container-1", nullptr, 965, "extra");
   CHECK("null, \"extra\"" == inspect(data));
 
   pn_data_clear(data);
-  pn_data_fill(data, "?DL[?SSnI]?S", true, (uint64_t)16, false, "container-1", 0, 965, true, "extra");
+  pn_data_fill(data, "?DL[?SSnI]?S", true, (uint64_t)16, false, "container-1", nullptr, 965, true, "extra");
   CHECK("@open(16) [channel-max=965], \"extra\"" == inspect(data));
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org