[2/3] gprs_llc: Prevent llme_alloc/lle_init from reading invalid memory
diff mbox

Message ID 9ea73a8c1fb0f60c8b36b8f2da24136450bf0460.1403881549.git.daniel@totalueberwachung.de
State Accepted
Headers show

Commit Message

Daniel Willmann June 27, 2014, 3:05 p.m. UTC
Make the llc_default_params structure from which data is initialized
large enough. Otherwise address sanitizer complains with out-of-bounds
reads.
---
 openbsc/src/gprs/gprs_llc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox

diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c
index 70fe9dd..e6b1f07 100644
--- a/openbsc/src/gprs/gprs_llc.c
+++ b/openbsc/src/gprs/gprs_llc.c
@@ -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,