gprs_llc: Prevent llme_alloc/lle_init from reading invalid memory
Make the llc_default_params structure from which data is initialized large enough. Otherwise address sanitizer complains with out-of-bounds reads. Only SAPIs 1, 2, 3, 5, 7, 8, 9, 11 are defined for GPRS but the struct gprs_llc_llme includes NUM_SAPIS lle's and they are populated from the llc_default_params structure.
This commit is contained in:
parent
8a485f0bec
commit
46d13268b8
|
@ -84,7 +84,7 @@ static int _bssgp_tx_dl_ud(struct msgb *msg, struct sgsn_mm_ctx *mmctx)
|
|||
|
||||
|
||||
/* Section 8.9.9 LLC layer parameter default values */
|
||||
static const struct gprs_llc_params llc_default_params[] = {
|
||||
static const struct gprs_llc_params llc_default_params[NUM_SAPIS] = {
|
||||
[1] = {
|
||||
.t200_201 = 5,
|
||||
.n200 = 3,
|
||||
|
|
Loading…
Reference in New Issue