Skip to content

Commit 5e4af33

Browse files
committed
utils: write_str: add missing SIMD highbit_set check
Signed-off-by: Eduardo Silva <[email protected]>
1 parent e456787 commit 5e4af33

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/flb_utils.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -830,9 +830,11 @@ int flb_utils_write_str(char *buf, int *off, size_t size, const char *str, size_
830830
* in a char-by-char basis. Otherwise the do a bulk copy
831831
*/
832832
if (flb_vector8_has_le(chunk, (unsigned char) 0x1F) ||
833-
flb_vector8_has(chunk, (unsigned char) '"') ||
834-
flb_vector8_has(chunk, (unsigned char) '\\')) {
833+
flb_vector8_has(chunk, (unsigned char) '"') ||
834+
flb_vector8_has(chunk, (unsigned char) '\\') ||
835+
flb_vector8_is_highbit_set(chunk)) {
835836
break;
837+
836838
}
837839
}
838840

0 commit comments

Comments
 (0)