Changeset: 45f83f67b6bf for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=45f83f67b6bf Modified Files: monetdb5/modules/kernel/algebra.mx Branch: default Log Message:
Fix algebra.fetch to check for correct boundaries. The argument is a BUN, but valid BUN values go from BINfirst() to BUNlast(). diffs (12 lines): diff --git a/monetdb5/modules/kernel/algebra.mx b/monetdb5/modules/kernel/algebra.mx --- a/monetdb5/modules/kernel/algebra.mx +++ b/monetdb5/modules/kernel/algebra.mx @@ -3417,7 +3417,7 @@ ALGfetch(ptr ret, int *bid, lng *pos) if ((b = BATdescriptor(*bid)) == NULL) { throw(MAL, "algebra.fetch", RUNTIME_OBJECT_MISSING); } - if ((*pos < 0) || (*pos >= (lng) BATcount(b))) + if ((*pos < (lng) BUNfirst(b)) || (*pos >= (lng) BUNlast(b))) throw(MAL, "algebra.fetch", ILLEGAL_ARGUMENT " Idx out of range\n"); msg = doALGfetch(ret, b, (BUN) *pos); BBPreleaseref(b->batCacheid); _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list