[sr-dev] [kamailio/kamailio] htable: Add new function into htable_api (#1866)

Daniel-Constantin Mierla notifications at github.com
Mon Feb 25 12:15:41 CET 2019


It doesn't seem safe what you do there, because you copy the value of the item in a new variable, then unlock the slot. But the value can be a string and that will point in share memory. By unlocking, the item in hash table can be deleted or modified, making the previous string value invalid.

See how is the function for pv get of $sht(...), there is a deep cloning of the item.

-- 
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/1866#issuecomment-466973400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190225/eec6ca8b/attachment.html>


More information about the sr-dev mailing list