Catch more possible instances of passing NULL to memcpy.
Actually fixes #1976.
This commit is contained in:
parent
d25d9f7cec
commit
cfdbfa6b2c
3 changed files with 10 additions and 4 deletions
|
|
@ -195,6 +195,7 @@ struct CurlDownloader : public Downloader
|
|||
if (readOffset == request.data->length())
|
||||
return 0;
|
||||
auto count = std::min(size * nitems, request.data->length() - readOffset);
|
||||
assert(count);
|
||||
memcpy(buffer, request.data->data() + readOffset, count);
|
||||
readOffset += count;
|
||||
return count;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue