Closed wbt729 closed 5 years ago
I'm getting a segfault when calling Buffer::getTLType().
Buffer::getTLType()
This happens in the getBufferString() function and can be fixed by the following code:
getBufferString()
inline std::string getBufferString(const std::shared_ptr<const GenTLWrapper> &gentl, void *stream, void *buffer, GenTL::BUFFER_INFO_CMD cmd) { std::string ret; GenTL::INFO_DATATYPE type; char tmp[1024]=""; size_t size=sizeof(tmp); if (stream != 0 && buffer != 0) { //if (gentl->DSGetBufferInfo(stream, buffer, cmd, &type, &ret, &size) == GenTL::GC_ERR_SUCCESS) if (gentl->DSGetBufferInfo(stream, buffer, cmd, &type, &tmp, &size) == GenTL::GC_ERR_SUCCESS) { if (type == GenTL::INFO_DATATYPE_STRING) { ret=tmp; } } } return ret; }
Thanks, I will add the fix.
Fixed with 38843f8fbf8eae676f4e94456a212c9c41a23745
I'm getting a segfault when calling
Buffer::getTLType()
.This happens in the
getBufferString()
function and can be fixed by the following code: