[sr-dev] [kamailio/kamailio] db_text fixes & live query (#1014)

Daniel-Constantin Mierla notifications at github.com
Sat Mar 4 08:54:04 CET 2017


miconda commented on this pull request.



> @@ -117,15 +117,22 @@ int dbt_raw_query_select(db1_con_t* _h, str* _s, db1_res_t** _r)
 		result_cols = pkg_malloc(sizeof(db_key_t) * cols);
 		memset(result_cols, 0, sizeof(db_key_t) * cols);
 		for(n=0; n < cols; n++) {
-			result_cols[n] = &_tbc->colv[n]->name;
+			result_cols[n] = pkg_malloc(sizeof(str));

The result of mallocs are not checked if there is a valid pointer or NULL, which can happen on not enough memory available.

-- 
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/1014#pullrequestreview-25114726
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20170303/1f02f1e6/attachment.html>


More information about the sr-dev mailing list