mirror of
https://github.com/ksherlock/profuse.git
synced 2024-12-23 11:31:43 +00:00
slight sanity checking
git-svn-id: https://profuse.googlecode.com/svn/branches/v2@260 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
parent
ef4f906d70
commit
2e4b2961eb
@ -176,11 +176,21 @@ VolumeEntry::~VolumeEntry()
|
||||
|
||||
void VolumeEntry::init(void *vp)
|
||||
{
|
||||
#undef __METHOD__
|
||||
#define __METHOD__ "VolumeEntry::init"
|
||||
|
||||
Entry::init(vp);
|
||||
_fileNameLength = Read8(vp, 6);
|
||||
|
||||
// verify filenamelength <= 7
|
||||
if (_fileNameLength > 7)
|
||||
throw new ProFUSE::Exception(__METHOD__ ": invalid name length");
|
||||
|
||||
// verify fileKind == 0
|
||||
// verify _fileCount reasonable
|
||||
// verify _lastVolumeBlock reasonable
|
||||
// verify _blocks reasonable.
|
||||
|
||||
|
||||
std::memcpy(_fileName, 7 + (uint8_t *)vp, _fileNameLength);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user