diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gsm/gsm48_arfcn_range_encode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gsm/gsm48_arfcn_range_encode.c b/src/gsm/gsm48_arfcn_range_encode.c index 6423a9a8..afe552d8 100644 --- a/src/gsm/gsm48_arfcn_range_encode.c +++ b/src/gsm/gsm48_arfcn_range_encode.c @@ -166,6 +166,10 @@ int osmo_gsm48_range_enc_determine_range(const int *arfcns, const int size, int { int max = 0; + /* don't dereference arfcns[] array if size is 0 */ + if (size == 0) + return OSMO_GSM48_ARFCN_RANGE_128; + /* * Go for the easiest. And pick arfcns[0] == f0. */ |