[sr-dev] git:4.2:6614c8e7: sqlops: fix column index for sqlops_is_null()

Daniel-Constantin Mierla miconda at gmail.com
Wed Mar 18 18:38:30 CET 2015


Module: kamailio
Branch: 4.2
Commit: 6614c8e78ac9cb5add92aff0db2d3a24dbc65423
URL: https://github.com/kamailio/kamailio/commit/6614c8e78ac9cb5add92aff0db2d3a24dbc65423

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-03-18T18:38:04+01:00

sqlops: fix column index for sqlops_is_null()

- report and patch by Mihaly Zachar

(cherry picked from commit 768dc8b566e2af04411570ef7b4d55a210a1927d)

---

Modified: modules/sqlops/sql_api.c

---

Diff:  https://github.com/kamailio/kamailio/commit/6614c8e78ac9cb5add92aff0db2d3a24dbc65423.diff
Patch: https://github.com/kamailio/kamailio/commit/6614c8e78ac9cb5add92aff0db2d3a24dbc65423.patch

---

diff --git a/modules/sqlops/sql_api.c b/modules/sqlops/sql_api.c
index 744f730..eeb6fac 100644
--- a/modules/sqlops/sql_api.c
+++ b/modules/sqlops/sql_api.c
@@ -763,7 +763,7 @@ int sqlops_is_null(str *sres, int i, int j)
 		LM_ERR("row index out of bounds [%d/%d]\n", i, res->nrows);
 		goto error;
 	}
-	if(i>=res->ncols)
+	if(j>=res->ncols)
 	{
 		LM_ERR("column index out of bounds [%d/%d]\n", j, res->ncols);
 		goto error;




More information about the sr-dev mailing list