mirror of
https://gitee.com/openharmony/third_party_jsoncpp
synced 2024-11-26 17:01:57 +00:00
修改漏洞 WS-2020-0319
Signed-off-by: fangyunzhong <fangyunzhong2@huawei.com>
This commit is contained in:
parent
10cdcc0343
commit
2ef66bf8cf
@ -1287,7 +1287,7 @@ void OurReader::skipSpaces() {
|
||||
void OurReader::skipBom(bool skipBom) {
|
||||
// The default behavior is to skip BOM.
|
||||
if (skipBom) {
|
||||
if (strncmp(begin_, "\xEF\xBB\xBF", 3) == 0) {
|
||||
if ((end_ - begin_) >= 3 && strncmp(begin_, "\xEF\xBB\xBF", 3) == 0) {
|
||||
begin_ += 3;
|
||||
current_ = begin_;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user