- Fixed crash because of a memory overwrite

The static arrays in RsDiscSpace were to small for RS_PGP_DIRECTORY (0x0003)
  Added new constant RS_DIRECTORY_COUNT
- Added missing fclose to PGPHandler::encryptTextToFile
  Used ops_teardown_file_write instead of ops_writer_close and ops_create_info_delete
  Windows cannot move a file when it is still open

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6542 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-07-26 23:12:09 +00:00
parent b84930b157
commit e95725ea2c
4 changed files with 16 additions and 14 deletions

View file

@ -28,6 +28,7 @@
#include <stdlib.h>
#include <stdint.h>
#include <util/rsthreads.h>
#include <retroshare/rstypes.h>
class RsDiscSpace
{
@ -53,10 +54,10 @@ class RsDiscSpace
static RsMutex _mtx ;
static time_t _last_check[3] ;
static time_t _last_check[RS_DIRECTORY_COUNT] ;
static uint32_t _size_limit_mb ;
static uint32_t _current_size[3] ;
static bool _last_res[3] ;
static uint32_t _current_size[RS_DIRECTORY_COUNT] ;
static bool _last_res[RS_DIRECTORY_COUNT] ;
static std::string _partials_path ;
static std::string _download_path ;