FIX VWR-25608 error on shutdow due to buffer overflow in LLVFS::audit
parent
b87cb90a55
commit
4bc90f24b3
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llvfs.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <set>
|
||||
#include <map>
|
||||
|
|
@ -39,8 +41,6 @@
|
|||
#include <sys/file.h>
|
||||
#endif
|
||||
|
||||
#include "llvfs.h"
|
||||
|
||||
#include "llstl.h"
|
||||
#include "lltimer.h"
|
||||
|
||||
|
|
@ -1711,7 +1711,8 @@ void LLVFS::audit()
|
|||
|
||||
BOOL vfs_corrupt = FALSE;
|
||||
|
||||
std::vector<U8> buffer(index_size);
|
||||
// since we take the address of element 0, we need to have at least one element.
|
||||
std::vector<U8> buffer(llmax(index_size,1U));
|
||||
|
||||
if (fread(&buffer[0], 1, index_size, mIndexFP) != index_size)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue