Message ID | 20241024164635.176631-5-prestwoj@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | [1/5] band: correct oper class 136 starting frequency | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
prestwoj/iwd-ci-gitlint | success | GitLint |
diff --git a/src/util.c b/src/util.c index 5ce764ae..8c690fc0 100644 --- a/src/util.c +++ b/src/util.c @@ -464,6 +464,11 @@ static void scan_channels_foreach(uint32_t channel, void *user_data) uint32_t freq; freq = band_channel_to_freq(channel, channels_data->band); + if (!freq) { + l_warn("invalid channel %u for band %u", channel, + channels_data->band); + return; + } channels_data->func(freq, channels_data->user_data); }