We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c161f4a commit 6aba23fCopy full SHA for 6aba23f
1 file changed
src/lib_json/json_reader.cpp
@@ -1270,7 +1270,7 @@ void OurReader::skipSpaces() {
1270
void OurReader::skipBom(bool skipBom) {
1271
// The default behavior is to skip BOM.
1272
if (skipBom) {
1273
- if (strncmp(begin_, "\xEF\xBB\xBF", 3) == 0) {
+ if ((end_ - begin_) >= 3 && strncmp(begin_, "\xEF\xBB\xBF", 3) == 0) {
1274
begin_ += 3;
1275
current_ = begin_;
1276
}
0 commit comments