> +             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;

@ovidiusas could you review this a bit - while looking at the [Travis 
log](https://travis-ci.org/OpenSIPS/opensips/builds/97166562) I noticed this 
warning, which actually may lead to a bug.

`data` is a pointer to an integer, that is passed to an integer. This may be a 
_huge_ value, that is used below to index the `reg_htable`.

My guess is that the line should be `int i = *(int *)data;`, but please give it 
a look too.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/701/files#r47752264
_______________________________________________
Devel mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to