Skip to content

Commit 15f1887

Browse files
committed
Change 'len' to 'vec_len' to ensure bytes past 'len' do not need to be escaped.
1 parent f49af9b commit 15f1887

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/json/ext/generator/generator.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ static inline char *copy_remaining_bytes(search_state *search, unsigned long vec
272272

273273
char *s = (buf->ptr + buf->len);
274274

275-
memset(s, 'X', len);
275+
memset(s, 'X', vec_len);
276276

277277
// Optimistically copy the remaining 'len' characters to the output FBuffer. If there are no characters
278278
// to escape, then everything ends up in the correct spot. Otherwise it was convenient temporary storage.

0 commit comments

Comments
 (0)