[sr-dev] [kamailio/kamailio] benchmark: b/f avoid undefined bytes when int and long int sizes mism… (#1146)
vhernando
notifications at github.com
Fri Jun 2 14:25:25 CEST 2017
…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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20170602/b0f8d070/attachment.html>
More information about the sr-dev
mailing list