MCPcopy Create free account
hub / github.com/Kitware/VTK / releasePrefixedStringValue

Function releasePrefixedStringValue

ThirdParty/jsoncpp/vtkjsoncpp/jsoncpp.cpp:2605–2612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2603 */
2604#if JSONCPP_USING_SECURE_MEMORY
2605static inline void releasePrefixedStringValue(char* value) {
2606 unsigned length = 0;
2607 char const* valueDecoded;
2608 decodePrefixedString(true, value, &length, &valueDecoded);
2609 size_t const size = sizeof(unsigned) + length + 1U;
2610 memset(value, 0, size);
2611 free(value);
2612}
2613static inline void releaseStringValue(char* value, unsigned length) {
2614 // length==0 => we allocated the strings memory
2615 size_t size = (length == 0) ? strlen(value) : length;

Callers 1

releasePayloadMethod · 0.85

Calls 1

decodePrefixedStringFunction · 0.85

Tested by

no test coverage detected