Skip to content

Commit 63f6e09

Browse files
committed
fixed non-equi out of bounds read
1 parent e4565f1 commit 63f6e09

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

NEWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,12 +613,12 @@
613613
614614
# data.table [v1.14.8](https://github.com/Rdatatable/data.table/milestone/28?closed=1)
615615
616-
## BUG FIXES
617-
618616
## NOTES
619617
620618
1. Test 1613.605 now passes changes to `as.data.frame()` in R-devel, [#5597](https://github.com/Rdatatable/data.table/pull/5597). Thanks to Avraham Adler for reporting.
621619
620+
2. An out of bounds read when combining non-equi join with `by=.EACHI` has been found and fixed thanks to clang ASAN, [#5598](https://github.com/Rdatatable/data.table/issues/5598). There was no bug or consequence because the read was followed (now preceded) by a bounds test.
621+
622622
623623
# data.table [v1.14.6](https://github.com/Rdatatable/data.table/milestone/27?closed=1) (16 Nov 2022)
624624

src/nqrecreateindices.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ SEXP nqRecreateIndices(SEXP xo, SEXP len, SEXP indices, SEXP nArg, SEXP nomatch)
2626
// TODO: revisit to see if this be simplified further when I've some time.
2727
R_len_t j=0, tmp=0;
2828
for (int i=0; i<n; ++i) {
29-
if (ixo[j] <= 0 || j >= xn) {
29+
if (j>=xn || ixo[j]<=0) {
3030
// NA_integer_ = INT_MIN is checked in init.c
3131
// j >= xn needed for special nomatch=NULL case, see issue#4388 (due to xo[irows] from R removing '0' value in xo)
3232
inewstarts[i] = inomatch;

0 commit comments

Comments
 (0)