[OpenSIPS-Devel] [ opensips-Bugs-2710489 ] BLOB handling in db_berkeley
SourceForge.net
noreply at sourceforge.net
Tue Mar 24 23:13:13 CET 2009
Bugs item #2710489, was opened at 2009-03-24 22:13
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2710489&group_id=232389
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: modules
Group: trunk
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: BLOB handling in db_berkeley
Initial Comment:
There is an error in function bdb_val2str (file bdb_val.c):
Should be:
case DB_BLOB:
l = VAL_BLOB(_v).len;
if (*_len < l)
{
LM_ERR("Destination buffer too short for blob\n");
return -7;
}
else
{
strncpy(_s,VAL_BLOB(_v).s,l);
LM_DBG("Converting BLOB [%s]\n", _s);
*_len = l;
return 0;
}
break;
Also, if we consider DB_STR, DB_STRING and DB_BLOB the same type, then bdb_is_neq_type (file bdb_res.c) need small correction:
case DB_STRING:
if(_t0==DB_STR || _t0==DB_BLOB)
return 0;
case DB_STR:
if(_t0==DB_STRING || _t0==DB_BLOB)
return 0;
case DB_BLOB:
if(_t0==DB_STR || _t0==DB_STRING)
return 0;
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2710489&group_id=232389
More information about the Devel
mailing list