<p style="white-space: pre-wrap; word-wrap: break-word;">I find the implementation a bit "inteeresting" in that it neither</p><p style="white-space: pre-wrap; word-wrap: break-word;">a) uses the raw input data and stores that, only generating strings during "show" time, nor<br>b) reuses the existing libosmocore/strrb.c  code for ring-buffers of strings.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I would say that either we store the raw/binary report data in some custom structure, but if we convert everything into strings at the time the alarm happens, then I would expect strrb.c to be usable?</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/17571">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/17571/2/src/osmo-bsc/osmo_bsc_main.c">File src/osmo-bsc/osmo_bsc_main.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/17571/2/src/osmo-bsc/osmo_bsc_main.c@220">Patch Set #2, Line 220:</a> <code style="font-family:monospace,monospace">        entry = talloc_zero(fail_rep->bts, struct bts_oml_fail_rep);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">please either return NULL if talloc fails, or OSMO_ASSERT() on the result.  The further talloc_strdup below result doesn't need to be checked, but if the first allocation fails, we are getting null pointer deref right below.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/17571">change 17571</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/+/17571"/><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: I18aa17a721cd5eb1c98926dc2367229c0a50bc78 </div>
<div style="display:none"> Gerrit-Change-Number: 17571 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-CC: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 23 Mar 2020 17:28:13 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>