openbsc[master]: abis: fix unaligned memory access

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Sep 1 07:53:50 UTC 2017


Patch Set 3:

(1 comment)

How often are those unaligned accesses? Are they in frequently-used code paths?  Do we really consider fixing those up an efficient use of our time/resources?

https://gerrit.osmocom.org/#/c/3750/3/openbsc/src/libbsc/abis_nm.c
File openbsc/src/libbsc/abis_nm.c:

Line 2797: 	/* FIXME: we try to overwrite the RAC (1 byte) with the Cell ID (2 bytes) so we also override part of LAC?! */
as you can see from the user/caller of the function, 'buf' is one byte larger in the ipacess case.  we hence write one byte more than in the RAC-case: 3 bytes MCC+MNC, 2 bytes LAC, 2 bytes CID.


-- 
To view, visit https://gerrit.osmocom.org/3750
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie8a3107c22cd7f3682fac037e04a50ef3ea9171c
Gerrit-PatchSet: 3
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list