<p>In <a href="https://github.com/OpenSIPS/opensips/pull/701#discussion_r47752264">modules/uac_registrant/registrant.c</a>:</p>
<pre style='color:#555'>> +                memcpy(new_rec->td.id.call_id.s, old_rec->td.id.call_id.s,
> +                 new_rec->td.id.call_id.len);
> +                memcpy(new_rec->td.id.loc_tag.s, old_rec->td.id.loc_tag.s,
> +                 new_rec->td.id.loc_tag.len);
> +                new_rec->td.loc_seq.value = old_rec->td.loc_seq.value;
> +                new_rec->last_register_sent = old_rec->last_register_sent;
> +                new_rec->registration_timeout = old_rec->registration_timeout;
> +                new_rec->state = old_rec->state;
> +        }
> +        return 0;
> +}
> +
> +int run_find_same_rec(void *e_data, void *data, void *r_data)
> +{
> +        reg_record_t *new_rec = (reg_record_t*)e_data;
> +        int i = (int*)data;
</pre>
<p><a href="https://github.com/ovidiusas" class="user-mention">@ovidiusas</a> could you review this a bit - while looking at the <a href="https://travis-ci.org/OpenSIPS/opensips/builds/97166562">Travis log</a> I noticed this warning, which actually may lead to a bug.</p>
<p><code>data</code> is a pointer to an integer, that is passed to an integer. This may be a <em>huge</em> value, that is used below to index the <code>reg_htable</code>.</p>
<p>My guess is that the line should be <code>int i = *(int *)data;</code>, but please give it a look too.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/pull/701/files#r47752264">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOcibByZR6GW11BPt7qf57iuvZ2nq_Gks5pQSSsgaJpZM4Gn_LN.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/OpenSIPS/opensips/pull/701/files#r47752264"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>