diff options
author | Underground78 <underground78@users.sourceforge.net> | 2013-10-26 16:15:58 +0400 |
---|---|---|
committer | Underground78 <underground78@users.sourceforge.net> | 2013-10-27 11:29:55 +0400 |
commit | d18e582ee6311e04a38feca36f29eb41fecd08b6 (patch) | |
tree | 61c46e58fc7621335657dca0dbd2308c7018e06a /src/filters/parser | |
parent | 44f47d3b6609d6886eddfbaa5f4862b2fd681abb (diff) |
Check that CAutoVectorPtr::Allocate succeeded before using the memory.
Fixes CID #965879 #1111760.
Diffstat (limited to 'src/filters/parser')
-rw-r--r-- | src/filters/parser/BaseSplitter/BaseSplitterFile.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/filters/parser/BaseSplitter/BaseSplitterFile.cpp b/src/filters/parser/BaseSplitter/BaseSplitterFile.cpp index ed40990be..4de8961ce 100644 --- a/src/filters/parser/BaseSplitter/BaseSplitterFile.cpp +++ b/src/filters/parser/BaseSplitter/BaseSplitterFile.cpp @@ -1,6 +1,6 @@ /*
* (C) 2003-2006 Gabest
- * (C) 2006-2012 see Authors.txt
+ * (C) 2006-2013 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -64,8 +64,7 @@ bool CBaseSplitterFile::SetCacheSize(int cachelen) {
m_pCache.Free();
m_cachetotal = 0;
- m_pCache.Allocate((size_t)cachelen);
- if (!m_pCache) {
+ if (!m_pCache.Allocate((size_t)cachelen)) {
return false;
}
m_cachetotal = cachelen;
|