Module: sip-router Branch: janakj/postgres Commit: fd355ee0b0d815fd42a0a4512566802f63c924f6 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fd355ee0...
Author: Henning Westerholt henning.westerholt@1und1.de Committer: Henning Westerholt henning.westerholt@1und1.de Date: Wed Jan 14 13:58:51 2009 +0000
- fix regression during value conversion when input SQL string is NULL, and value type is BLOB, reported from jordan at flowroute dot com
git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@5459 689a6050-402a-0410-94f2-e92a70836424
---
modules/db_postgres/km_val.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules/db_postgres/km_val.c b/modules/db_postgres/km_val.c index 7cc308a..e47467e 100644 --- a/modules/db_postgres/km_val.c +++ b/modules/db_postgres/km_val.c @@ -57,7 +57,8 @@ */ int db_postgres_str2val(const db_type_t _t, db_val_t* _v, const char* _s, const int _l) { - if ( (_t != DB_BLOB && _v != NULL) || _v == NULL) { + /* use common function for non BLOB, NULL setting and input parameter checking */ + if ( _t != DB_BLOB || _s == NULL || _v == NULL) { return db_str2val(_t, _v, _s, _l, 1); } else { char * tmp_s = NULL;