fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmocom-bb/+/34534?usp=email )
Change subject: modem: fix grr_st_packet_access_action(): shift rr->cr_hist properly
......................................................................
modem: fix grr_st_packet_access_action(): shift rr->cr_hist properly
Pass size in bytes to memcpy(), not number of elements!
Change-Id: I687435f5458e766d9d61143d6e4255f089fe1caf
Fixes: 6db5f8b9c "modem: get rid of app_data.chan_req, use ms->rrlayer"
Related: OS#5500, OS#6131
---
M src/host/layer23/src/modem/grr.c
1 file changed, 15 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/34/34534/1
diff --git a/src/host/layer23/src/modem/grr.c b/src/host/layer23/src/modem/grr.c
index a029dd8..4e29909 100644
--- a/src/host/layer23/src/modem/grr.c
+++ b/src/host/layer23/src/modem/grr.c
@@ -688,7 +688,8 @@
}
/* shift the CHANNEL REQUEST history buffer */
- memmove(&rr->cr_hist[1], &rr->cr_hist[0], ARRAY_SIZE(rr->cr_hist) -
1);
+ memmove(&rr->cr_hist[1], &rr->cr_hist[0],
+ sizeof(rr->cr_hist) - sizeof(rr->cr_hist[0]));
/* store the new entry */
rr->cr_hist[0].ref = *ref;
rr->cr_hist[0].ref.ra = rr->cr_ra;
--
To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/34534?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I687435f5458e766d9d61143d6e4255f089fe1caf
Gerrit-Change-Number: 34534
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange