asn1: Remove a reference to asn1_data internals
authorVolker Lendecke <vl@samba.org>
Mon, 4 Jan 2016 09:42:11 +0000 (10:42 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 28 Mar 2016 22:41:20 +0000 (00:41 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 44c56fc66788adf7b58f1d77a1e7d79d840ea9f6)

lib/util/tests/asn1_tests.c

index 2c68cb435de5cda09bf36f9b5bfa5d0f79b10bfa..a91d7a7389adf0579f9655664bb24df6b17d8adc 100644 (file)
@@ -337,8 +337,10 @@ static bool test_asn1_Integer(struct torture_context *tctx)
 
                if (!asn1_write_Integer(data, integer_tests[i].value)) goto err;
 
-               blob.data = data->data;
-               blob.length = data->length;
+               if (!asn1_blob(data, &blob)) {
+                       goto err;
+               }
+
                torture_assert_data_blob_equal(tctx, blob, integer_tests[i].blob, "asn1_write_Integer gave incorrect result");
 
                if (!asn1_load(data, blob)) goto err;