[open-ils-commits] r9113 - trunk/Open-ILS/src/c-apps
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Mar 23 23:13:04 EDT 2008
Author: miker
Date: 2008-03-23 22:38:06 -0400 (Sun, 23 Mar 2008)
New Revision: 9113
Modified:
trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
protect against null params to transforms in SQL
Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c 2008-03-24 01:57:09 UTC (rev 9112)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c 2008-03-24 02:38:06 UTC (rev 9113)
@@ -1184,7 +1184,9 @@
char* val = jsonObjectToSimpleString(func_item);
- if ( dbi_conn_quote_string(dbhandle, &val) ) {
+ if ( !val ) {
+ buffer_add( sql_buf, ",NULL" );
+ } else if ( dbi_conn_quote_string(dbhandle, &val) ) {
buffer_fadd( sql_buf, ",%s", val );
} else {
osrfLogError(OSRF_LOG_MARK, "%s: Error quoting key string [%s]", MODULENAME, val);
More information about the open-ils-commits
mailing list