diff --git a/utils/joiner/tuplejoiner.cpp b/utils/joiner/tuplejoiner.cpp index 30d97f6be..671e63466 100644 --- a/utils/joiner/tuplejoiner.cpp +++ b/utils/joiner/tuplejoiner.cpp @@ -624,6 +624,10 @@ TypelessData makeTypelessKey(const Row &r, const vector &keyCols, // this is a string, copy a normalized version const uint8_t *str = r.getStringPointer(keyCols[i]); uint32_t width = r.getStringLength(keyCols[i]); + if (width > 65536) + { + throw runtime_error("Cannot join strings greater than 64KB"); + } for (j = 0; j < width && str[j] != 0; j++) { if (off >= keylen) goto toolong; @@ -679,6 +683,10 @@ TypelessData makeTypelessKey(const Row &r, const vector &keyCols, Pool // this is a string, copy a normalized version const uint8_t *str = r.getStringPointer(keyCols[i]); uint32_t width = r.getStringLength(keyCols[i]); + if (width > 65536) + { + throw runtime_error("Cannot join strings greater than 64KB"); + } for (j = 0; j < width && str[j] != 0; j++) ret.data[off++] = str[j]; ret.data[off++] = 0;