diff options
author | srs5694 <srs5694@users.sourceforge.net> | 2011-06-10 01:16:51 -0400 |
---|---|---|
committer | srs5694 <srs5694@users.sourceforge.net> | 2011-06-10 01:16:51 -0400 |
commit | 6aae2a9b70e9f88926baad94c1eea40e0b534f01 (patch) | |
tree | 1e6d2e25970f415091b8f6518eb1f6d8e0988847 /bsd.cc | |
parent | 699941e25a1fcf0beec124203747c8ed20842989 (diff) | |
download | sgdisk-6aae2a9b70e9f88926baad94c1eea40e0b534f01.tar.gz |
Miscellaneous bug fixes.
Diffstat (limited to 'bsd.cc')
-rw-r--r-- | bsd.cc | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -134,6 +134,10 @@ int BSDData::ReadBSDData(DiskIO *theDisk, uint64_t startSector, uint64_t endSect // If the state is good, go ahead and load the main partition data.... if (state == bsd) { partitions = new struct BSDRecord[numParts * sizeof(struct BSDRecord)]; + if (partitions == NULL) { + cerr << "Unable to allocate memory in BSDData::ReadBSDData()! Terminating!\n"; + exit(1); + } // if for (i = 0; i < numParts; i++) { // Once again, we use the buffer, but index it using a BSDRecord // pointer (dangerous, but effective).... |