Skip to content

Commit d30d10b

Browse files
dawesccdunn2001
dawesc
authored andcommitted
partial
1 parent 1002cc5 commit d30d10b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Diff for: include/json/config.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ typedef UInt64 LargestUInt;
150150
#define JSON_HAS_INT64
151151
#endif // if defined(JSON_NO_INT64)
152152
#if JSON_USE_SECURE_MEMORY
153-
#define JSONCPP_STRING std::basic_string<char, std::char_traits<char>, SecureAllocator<char> >
154-
#define JSONCPP_OSTRINGSTREAM std::basic_ostringstream<char, std::char_traits<char>, SecureAllocator<char> >
153+
#define JSONCPP_STRING std::basic_string<char, std::char_traits<char>, Json::SecureAllocator<char> >
154+
#define JSONCPP_OSTRINGSTREAM std::basic_ostringstream<char, std::char_traits<char>, Json::SecureAllocator<char> >
155155
#define JSONCPP_OSTREAM std::basic_ostream<char, std::char_traits<char>>
156-
#define JSONCPP_ISTRINGSTREAM std::basic_istringstream<char, std::char_traits<char>, SecureAllocator<char> >
156+
#define JSONCPP_ISTRINGSTREAM std::basic_istringstream<char, std::char_traits<char>, Json::SecureAllocator<char> >
157157
#define JSONCPP_ISTREAM std::istream
158158
#else
159159
#define JSONCPP_STRING std::string

Diff for: include/json/value.h

+3
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,9 @@ Json::Value obj_value(Json::objectValue); // {}
323323
int compare(const Value& other) const;
324324

325325
const char* asCString() const; ///< Embedded zeroes could cause you trouble!
326+
#if JSON_USE_SECURE_MEMORY
327+
unsigned getCStringLength() const; //Allows you to understand the length of the CString
328+
#endif
326329
JSONCPP_STRING asString() const; ///< Embedded zeroes are possible.
327330
/** Get raw char* of string-value.
328331
* \return false if !string. (Seg-fault if str or end are NULL.)

0 commit comments

Comments
 (0)