diff --git a/simdzone/src/generic/text.h b/simdzone/src/generic/text.h index 2288c33..5d40062 100644 --- a/simdzone/src/generic/text.h +++ b/simdzone/src/generic/text.h @@ -66,7 +66,7 @@ static really_inline int32_t scan_string( goto escaped; if (length < 32) - return (int32_t)count; + return octets + count <= limit ? (int32_t)count : -1; text += count; wire += count; -- 2.43.0