laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-tetra/+/28596 )

Change subject: fixed out of bounds write to pdu_sync buffer
......................................................................

fixed out of bounds write to pdu_sync buffer

Change-Id: I414bf2d61dc1cb37d30dc84b401a75b918116bbb
---
M src/conv_enc_test.c
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/conv_enc_test.c b/src/conv_enc_test.c
index 303ef31..166cebc 100644
--- a/src/conv_enc_test.c
+++ b/src/conv_enc_test.c
@@ -335,12 +335,12 @@
        srand(time(NULL));
        for (i = 0; i < 100; i++) {
                uint32_t r = rand();
-               osmo_pbit2ubit(pdu_sync, (uint8_t *) &r, 32);
-               osmo_pbit2ubit(pdu_sync+32, (uint8_t *)&r, 60-32);
+               osmo_store32le(r, pdu_sync);
+               osmo_store32le(r, pdu_sync + 4);
                //build_sb();

-               osmo_pbit2ubit(pdu_schf, (uint8_t *) &r, 32);
-               osmo_pbit2ubit(pdu_schf+32, (uint8_t *)&r, 60-32);
+               osmo_store32le(r, pdu_schf);
+               osmo_store32le(r, pdu_schf + 4);
                build_ndb_schf();
        }
 #endif

--
To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/28596
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Change-Id: I414bf2d61dc1cb37d30dc84b401a75b918116bbb
Gerrit-Change-Number: 28596
Gerrit-PatchSet: 2
Gerrit-Owner: wbokslag <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-MessageType: merged

Reply via email to