…atch.
void bm_rpc_enable_global(rpc_t* rpc, void* ctx)
{
long int v1;
if(rpc->scan(ctx, "d", (int*)(&v1))<1) {
rpc->scan does not fill all the bytes of v1 if long int and int sizes differ,
then checks like this usually fail:
if ((v1 < -1) || (v1 > 1)) {
rpc->fault(ctx, 500, "Invalid Parameter Value");
return;
}
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1146
-- Commit Summary --
* benchmark: b/f avoid undefined bytes when int and long int sizes mismatch.
-- File Changes --
M src/modules/benchmark/benchmark.c (8)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1146.patch
https://github.com/kamailio/kamailio/pull/1146.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1146