From adedfc64351a2dc1e2342e8d5677a60ffd1d97a0 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Fri, 16 May 2025 16:59:45 -0400 Subject: [PATCH] Mention we don't validate utf-8 --- src/test.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test.cpp b/src/test.cpp index 86157ef..8945452 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -206,7 +206,8 @@ constexpr static struct Tables { namespace { // Straightforward recursive descent that doesn't handle string escaping and -// all numbers. May stack overflow on deeply nested json documents +// all numbers. Does not validate utf-8. May stack overflow on deeply nested +// json documents struct Parser1 { Parser1(char *buf, int len, const Callbacks *callbacks, void *data) : buf(buf), bufEnd(buf + len), callbacks(callbacks), data(data) {} @@ -453,7 +454,7 @@ private: #endif // Table-based ll(1) parser that doesn't handle escaping and all numbers, with a -// streaming interface. Uses O(1) memory. +// streaming interface. Does not validate utf-8. Uses O(1) memory. struct Parser2 { Parser2(const Callbacks *callbacks, void *data) : callbacks(callbacks), data(data) {