Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/rarfilesource.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOctaneSnail <os@v12pwr.com>2008-12-13 22:02:08 +0300
committerOctaneSnail <os@v12pwr.com>2008-12-13 22:54:08 +0300
commit82e5a3271ae675ddfd4f9153b3e19e8c0f911097 (patch)
tree16fc4408cec423b63d6570bd0e481b84aeb1d35e /RFS.cpp
parent0978b5dd252cfdfed9813af201d634aa9e79d949 (diff)
Add missing OOM check.
Spotted by OV2.
Diffstat (limited to 'RFS.cpp')
-rw-r--r--RFS.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/RFS.cpp b/RFS.cpp
index b2271a9..cad52fa 100644
--- a/RFS.cpp
+++ b/RFS.cpp
@@ -443,6 +443,12 @@ int CRARFileSource::ScanArchive (wchar_t *archive_name, List<File> *file_list, i
file = new File ();
+ if (!file)
+ {
+ ErrorMsg (0, L"Out of memory.");
+ return FALSE;
+ }
+
file->media_type.SetType (&MEDIATYPE_Stream);
file->media_type.SetSubtype (&MEDIASUBTYPE_NULL);
file->filename = rh.fh.filename;