tests/ranap_rab_ass: fix potential NULL pointer dereferences

Change-Id: I16fea7b2a8cb1d693e01c91d7633550e2e599ceb
Related: CID#275345
changes/37/28837/3
Vadim Yanitskiy 4 months ago
parent 223aeda282
commit b7ff03e5be
  1. 3
      tests/ranap_rab_ass/ranap_rab_ass_test.c
  2. 1
      tests/ranap_rab_ass/ranap_rab_ass_test.ok

@ -61,7 +61,7 @@ void test_ranap_rab_ass_req_decode_encode(void)
OSMO_ASSERT(rc == 0);
encoded = ranap_rab_ass_req_encode(&message.msg.raB_AssignmentRequestIEs);
printf("ranap_rab_ass_req_encode %s\n", encoded ? "ok" : "ERROR");
OSMO_ASSERT(encoded != NULL);
printf("INPUT: %s\n", osmo_hexdump_nospc(testvec, sizeof(testvec)));
printf("RESULT: %s\n", osmo_hexdump_nospc(encoded->data, encoded->len));
@ -214,6 +214,7 @@ void test_ranap_rab_ass_req_ies_replace_inet_addr(void)
printf("after: addr=%s, port=%u, rab_id=%u\n", addr_str.ip, addr_str.port, rab_id);
encoded = ranap_rab_ass_req_encode(&message.msg.raB_AssignmentRequestIEs);
OSMO_ASSERT(encoded != NULL);
OSMO_ASSERT(encoded->len == sizeof(testvec_expected_out));
OSMO_ASSERT(memcmp(encoded->data, testvec_expected_out, encoded->len) == 0);

@ -1,4 +1,3 @@
ranap_rab_ass_req_encode ok
INPUT: 0000005900000100364052000001003500487822cd80102fa7201a2c0000f44c080a028000514000272028140067400000222814003c40000000503d02000227c03500010a0901a200000000000000000000000000401f760000400100
RESULT: 0000005900000100364052000001003500487822cd80102fa7201a2c0000f44c080a028000514000272028140067400000222814003c40000000503d02000227c03500010a0901a200000000000000000000000000401f760000400100
ranap_rab_ass_resp_encode rc=46

Loading…
Cancel
Save