summaryrefslogtreecommitdiffstats
path: root/src/host
diff options
context:
space:
mode:
authorHarald Welte2011-07-16 17:38:19 +0200
committerHarald Welte2011-07-16 17:38:19 +0200
commiteb77945e162ae1968242009372e448b7af51ea50 (patch)
treec3fd172ca59e6f1d804ceba75961be92424b8a46 /src/host
parentgsm48_rr: Don't overflow array boundary (diff)
downloadosmocom-eb77945e162ae1968242009372e448b7af51ea50.tar.gz
osmocom-eb77945e162ae1968242009372e448b7af51ea50.tar.xz
osmocom-eb77945e162ae1968242009372e448b7af51ea50.zip
sysinfo.h: ARFCN can be 0..1024, so we need an array of 1025 entries
Detected by Smatch: src/host/layer23/src/mobile/gsm48_rr.c +1658 gsm48_new_sysinfo(23) warn: buffer overflow 's->freq' 1024 <= 1024
Diffstat (limited to 'src/host')
-rw-r--r--src/host/layer23/include/osmocom/bb/common/sysinfo.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/host/layer23/include/osmocom/bb/common/sysinfo.h b/src/host/layer23/include/osmocom/bb/common/sysinfo.h
index 0498e91..6c8d37c 100644
--- a/src/host/layer23/include/osmocom/bb/common/sysinfo.h
+++ b/src/host/layer23/include/osmocom/bb/common/sysinfo.h
@@ -35,7 +35,7 @@ struct gsm48_sysinfo {
uint8_t si5t_msg[18];
uint8_t si6_msg[18];
- struct gsm_sysinfo_freq freq[1024]; /* all frequencies */
+ struct gsm_sysinfo_freq freq[1024+1]; /* all frequencies */
uint16_t hopping[64]; /* hopping arfcn */
uint8_t hopp_len;