mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 16:09:35 -05:00
added check for return value of fseek in ftFileProvider
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8510 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
15bb95a398
commit
cc0f1be95d
@ -175,7 +175,14 @@ bool ftFileProvider::getFileData(const RsPeerId& peer_id,uint64_t offset, uint32
|
||||
/*
|
||||
* seek for base_loc
|
||||
*/
|
||||
fseeko64(fd, base_loc, SEEK_SET);
|
||||
if(fseeko64(fd, base_loc, SEEK_SET) == -1)
|
||||
{
|
||||
#ifdef DEBUG_FT_FILE_PROVIDER
|
||||
std::cerr << "ftFileProvider::getFileData() Failed to seek. Data_size=" << data_size << ", base_loc=" << base_loc << " !" << std::endl;
|
||||
#endif
|
||||
//free(data); No!! It's already freed upwards in ftDataMultiplex::locked_handleServerRequest()
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Data space allocated by caller.
|
||||
//void *data = malloc(chunk_size);
|
||||
|
Loading…
Reference in New Issue
Block a user