Changeset: ad5059ce40eb for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ad5059ce40eb
Modified Files:
        clients/mapilib/mapi.c
Branch: protocol
Log Message:

Add error message for incorrect field number.


diffs (14 lines):

diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -5697,6 +5697,10 @@ mapi_fetch_field(MapiHdl hdl, int fnr)
        struct MapiResultSet *result;
        result = hdl->result;
        if (result != NULL && result->prot10_resultset) {
+               if (fnr < 0 || fnr >= result->fieldcnt) {
+                       mapi_setError(hdl->mid, "Illegal field number", 
"mapi_fetch_field", MERROR);
+                       return 0;
+               }
                if (result == NULL || 
                        result->fields == NULL || 
                        result->fields[fnr].converter == NULL || 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to