<p>lynxis lazus has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/20290">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">generate_ma_for_ts: check num_cell_arfcns to guarantee no out-of-bounds access<br><br>Change-Id: I2ee8e8b4ba5e16b955685ba42bd58dc2ea08720f<br>---<br>M src/osmo-bsc/osmo_bsc_main.c<br>1 file changed, 3 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/90/20290/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c</span><br><span>index 20bd620..b822a05 100644</span><br><span>--- a/src/osmo-bsc/osmo_bsc_main.c</span><br><span>+++ b/src/osmo-bsc/osmo_bsc_main.c</span><br><span>@@ -256,6 +256,9 @@</span><br><span>                      num_cell_arfcns++;</span><br><span>   }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (num_cell_arfcns > sizeof(ts->hopping.ma_data) * 8)</span><br><span style="color: hsl(120, 100%, 40%);">+          num_cell_arfcns = sizeof(ts->hopping.ma_data);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  /* pad it to octet-aligned number of bits */</span><br><span>         ts->hopping.ma_len = OSMO_BYTES_FOR_BITS(num_cell_arfcns);</span><br><span>        ma->cur_bit = (ts->hopping.ma_len * 8) - 1;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/20290">change 20290</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-bsc/+/20290"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I2ee8e8b4ba5e16b955685ba42bd58dc2ea08720f </div>
<div style="display:none"> Gerrit-Change-Number: 20290 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>