Bugs item #1908392, was opened at 2008-03-05 23:39
Message generated for change (Settings changed) made by henningw
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: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Iouri Kharon (yjh-styx)
>Assigned to: Henning Westerholt (henningw)
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) {


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

>Comment By: Henning Westerholt (henningw)
Date: 2008-03-06 09:33

Message:
Logged In: YES 
user_id=337916
Originator: NO

Hi Iouri,

thank you for the report and patch. I applied it both to trunk and 1.3.

Cheers,

Henning

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

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