Changeset: 3c5ea0e3eb60 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3c5ea0e3eb60
Modified Files:
        monetdb5/mal/mal_interpreter.c
Branch: Jan2014
Log Message:

Avoid potential bad read.
Found by Coverity


diffs (12 lines):

diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c
--- a/monetdb5/mal/mal_interpreter.c
+++ b/monetdb5/mal/mal_interpreter.c
@@ -1379,7 +1379,7 @@ void garbageElement(Client cntxt, ValPtr
                if (!BBP_lrefs(bid))
                        return;
                BBPdecref(bid, TRUE);
-       } else if (0 < v->vtype && v->vtype < TYPE_any && ATOMextern(v->vtype)) 
{
+       } else if (0 < v->vtype && v->vtype < MAXATOMS && ATOMextern(v->vtype)) 
{
                if (v->val.pval)
                        GDKfree(v->val.pval);
                v->val.pval = 0;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to