[sr-dev] [kamailio/kamailio] Modules: db_redis for usrloc module (#1422)

Daniel-Constantin Mierla notifications at github.com
Thu Feb 8 14:17:11 CET 2018


The module is very tight to usrloc module, embedding even the default column names for location table. If this is going to be merge in this state, I would suggest to name it like `db_redisuloc` or something else that suggests the constraints with its usage. Later can be renamed.

Regarding the issue with snprintf size parameter reported above, I spotted like:

```
return_code = snprintf(table_name,(CON_TABLE(_h)->len+1) * sizeof(char),"%s%.*s%s",CON_TQUOTESZ(_h), CON_TABLE(_h)->len, CON_TABLE(_h)->s, CON_TQUOTESZ(_h));
```
Another aspect that needs to be take care is to check if pkg_malloc() returns NULL or not -- if there is no sufficient memory, it will cause a crash.

-- 
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/1422#issuecomment-364108421
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20180208/ebef172e/attachment.html>


More information about the sr-dev mailing list