mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-22 15:15:28 +00:00
Fix incorrect size in memcpy (copyAndReturn)
This commit is contained in:
@ -275,7 +275,7 @@ int copyAndReturn(std::vector<T> b, T *buffer, int size) {
|
||||
|
||||
if (size < int(b.size()))
|
||||
return RTC_ERR_TOO_SMALL;
|
||||
memcpy(buffer, b.data(), size * sizeof(*buffer));
|
||||
memcpy(buffer, b.data(), b.size() * sizeof(*buffer));
|
||||
return int(b.size());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user