-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed out of bound read in FindMember() and added related new APIs
The original FindMember() may access out-of-bound of the 'const char* name' parameter. This commit firstly follows pah/rapidjson@f86af8c However, this must incur an StrLen() for name. A better API is by using Value as the name, which provides the length of string internally. So a set of new API are added: operator[](const GenericValue& name) FindMember(const GenericValue& name) RemoveMember(const GenericValue& name) During refactoring, it also adds an API: RemoveMember(MemberIterator m) which can be used for other purpose, such as removing a member while iterating an object. Fixes #7
- Loading branch information
Showing
2 changed files
with
104 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters