Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
sec: fix bug in MallocedBuffer
  • Loading branch information
tniessen authored Oct 12, 2018
commit 0fa24c0efec9d7ad8702f9374f2f2b64c9a22cb5
2 changes: 1 addition & 1 deletion src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ struct MallocedBuffer {

MallocedBuffer() : data(nullptr) {}
explicit MallocedBuffer(size_t size) : data(Malloc<T>(size)), size(size) {}
MallocedBuffer(char* data, size_t size) : data(data), size(size) {}
MallocedBuffer(T* data, size_t size) : data(data), size(size) {}
MallocedBuffer(MallocedBuffer&& other) : data(other.data), size(other.size) {
Comment thread
addaleax marked this conversation as resolved.
other.data = nullptr;
}
Expand Down