diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2013-02-03 13:38:12 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2013-02-07 23:03:59 +0400 |
commit | 03854247073e4739b69bc1c7313c57a159b39c59 (patch) | |
tree | 62fb84efe7ef3cd7954da50e6fd27b14315e50a0 /src/filters/parser/AviSplitter | |
parent | d10855d5614c13a57e3285e271738a23ba90b885 (diff) |
use try catch directly instead of the AFX macros
Diffstat (limited to 'src/filters/parser/AviSplitter')
-rw-r--r-- | src/filters/parser/AviSplitter/AviFile.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/filters/parser/AviSplitter/AviFile.cpp b/src/filters/parser/AviSplitter/AviFile.cpp index f818a82bb..e886aedfe 100644 --- a/src/filters/parser/AviSplitter/AviFile.cpp +++ b/src/filters/parser/AviSplitter/AviFile.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.
*
@@ -261,14 +261,13 @@ HRESULT CAviFile::Parse(DWORD parentid, __int64 end) ASSERT(strm->indx == NULL);
AVISUPERINDEX* pSuperIndex;
if (size < MAXDWORD - 8) {
- // Fix buffer overrun vulnerability : http://www.vulnhunt.com/advisories/CAL-20070912-1_Multiple_vendor_produce_handling_AVI_file_vulnerabilities.txt
- TRY {
+ // Fix buffer overrun vulnerability
+ try {
pSuperIndex = (AVISUPERINDEX*)DEBUG_NEW unsigned char [(size_t)(size + 8)];
- }
- CATCH(CMemoryException, e) {
+ } catch (CMemoryException* e) {
pSuperIndex = NULL;
+ e->Delete();
}
- END_CATCH
if (pSuperIndex) {
strm->indx.Attach(pSuperIndex);
strm->indx->fcc = FCC('indx');
|