fixed out of bounds write to pdu_sync buffer

Change-Id: I414bf2d61dc1cb37d30dc84b401a75b918116bbb
This commit is contained in:
wbokslag 2022-07-11 15:12:52 +02:00
parent f0c5f795af
commit 1feba505bb
1 changed files with 4 additions and 4 deletions

View File

@ -335,12 +335,12 @@ int main(int argc, char **argv)
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