Bugs item #1908392, was opened at 2008-03-06 02:39
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1908392&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver devel
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Iouri Kharon (yjh-styx)
Assigned to: Nobody/Anonymous (nobody)
Summary: non check bug in db_util

Initial Comment:
Functions db_print_set and db_print where do not check errors returned by 
val2str.
Attached patch correct this
----------------------------------------
Index: db/db_ut.c
===================================================================
--- db/db_ut.c  (revision 3862)
+++ db/db_ut.c  (working copy)
@@ -291,7 +291,10 @@
                        len += ret;
                }
                l = _l - len;
-               (*val2str)(_c, &(_v[i]), _b + len, &l);
+               if ( (*val2str)(_c, &(_v[i]), _b + len, &l) < 0) {
+                       LM_ERR("Error while converting value to string\n");
+                       return -1;
+               }
                len += l;
                if (i != (_n - 1)) {
                        ret = snprintf(_b + len, _l - len, " AND ");
@@ -328,7 +331,10 @@
                len += ret;
 
                l = _l - len;
-               (*val2str)(_c, &(_v[i]), _b + len, &l);
+               if ( (*val2str)(_c, &(_v[i]), _b + len, &l) < 0) {
+                       LM_ERR("Error while converting value to string\n");
+                       return -1;
+               }
                len += l;
                if (i != (_n - 1)) {
                        if ((_l - len) >= 1) {


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1908392&group_id=139143

_______________________________________________
Devel mailing list
[email protected]
http://lists.openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to