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
_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to