Module: kamailio
Branch: 4.1
Commit: 0c8419e3ef8137b443978195f0dfd975578afcff
URL: 
https://github.com/kamailio/kamailio/commit/0c8419e3ef8137b443978195f0dfd975578afcff

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2015-03-18T18:39:00+01:00

sqlops: fix column index for sqlops_is_null()

- report and patch by Mihaly Zachar

(cherry picked from commit 768dc8b566e2af04411570ef7b4d55a210a1927d)
(cherry picked from commit 6614c8e78ac9cb5add92aff0db2d3a24dbc65423)

---

Modified: modules/sqlops/sql_api.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/0c8419e3ef8137b443978195f0dfd975578afcff.diff
Patch: 
https://github.com/kamailio/kamailio/commit/0c8419e3ef8137b443978195f0dfd975578afcff.patch

---

diff --git a/modules/sqlops/sql_api.c b/modules/sqlops/sql_api.c
index bbf86c8..2781069 100644
--- a/modules/sqlops/sql_api.c
+++ b/modules/sqlops/sql_api.c
@@ -743,7 +743,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;


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to