mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-04-20 15:25:57 -04:00
corrected wrong allocation request
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.4.x@1573 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
65887cbd78
commit
18e9fe3374
@ -413,8 +413,13 @@ bool ftDataMultiplex::locked_handleServerRequest(ftFileProvider *provider,
|
||||
std::string peerId, std::string hash, uint64_t size,
|
||||
uint64_t offset, uint32_t chunksize)
|
||||
{
|
||||
void *data = malloc(size);
|
||||
void *data = malloc(chunksize);
|
||||
|
||||
if(data == NULL)
|
||||
{
|
||||
std::cerr << "WARNING: Could not allocate data for a chunksize of " << chunksize << std::endl ;
|
||||
return false ;
|
||||
}
|
||||
#ifdef MPLEX_DEBUG
|
||||
std::cerr << "ftDataMultiplex::locked_handleServerRequest()";
|
||||
std::cerr << "\t peer: " << peerId << " hash: " << hash;
|
||||
|
Loading…
x
Reference in New Issue
Block a user