JSONCPP_USING_SECURE_MEMORY flag in json_value.cpp #1307
Unanswered
muralitharanperumal
asked this question in
Q&A
Replies: 1 comment
-
Ok. this should be fine I guess. we just make the allocation 0 before freeing the memory. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The function 'static inline void releasePrefixedStringValue(char* value)' is conditionally compiled by the flag JSONCPP_USING_SECURE_MEMORY but the function
static inline char* duplicateAndPrefixStringValue(
const char* value,
unsigned int length)
is not defined under this flag.
But in the Value destructor, we are calling 'releasePrefixedStringValue', does this not result in undefined behaviour? as the first 4 byte is actually the length of the string?
Please comment.
Beta Was this translation helpful? Give feedback.
All reactions