diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bsc/arfcn_range_encode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/osmo-bsc/arfcn_range_encode.c b/src/osmo-bsc/arfcn_range_encode.c index 84f9f635f..54d98a967 100644 --- a/src/osmo-bsc/arfcn_range_encode.c +++ b/src/osmo-bsc/arfcn_range_encode.c @@ -168,6 +168,10 @@ int range_enc_determine_range(const int *arfcns, const int size, int *f0) { int max = 0; + /* don't dereference arfcns[] array if size is 0 */ + if (size == 0) + return ARFCN_RANGE_128; + /* * Go for the easiest. And pick arfcns[0] == f0. */ |