Update of /cvsroot/audacity/audacity-src/src/effects
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv5547/effects
Modified Files:
Equalization.cpp
Log Message:
Port security vulnerability fixes, per NGS report, from custom UmixIt version.
Index: Equalization.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/effects/Equalization.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- Equalization.cpp 17 Jan 2007 23:44:34 -0000 1.48
+++ Equalization.cpp 25 Jan 2007 03:01:11 -0000 1.49
@@ -1529,7 +1529,10 @@
// Create a new curve and name it
if( !wxStrcmp( attr, wxT("name") ) )
{
- mCurves.Add( EQCurve( value ) );
+ const wxString strValue = value;
+ if (!XMLValueChecker::IsGoodString(strValue))
+ return false;
+ mCurves.Add( EQCurve( strValue ) );
}
}
@@ -1545,20 +1548,29 @@
double d = 0.0;
// Process the attributes
+ double dblValue;
while( *attrs )
{ // Cache attr/value and bump to next
const wxChar *attr = *attrs++;
const wxChar *value = *attrs++;
+ const wxString strValue = value;
+
// Get the frequency
if( !wxStrcmp( attr, wxT("f") ) )
{
- f = Internat::CompatibleToDouble( value );
+ if (!XMLValueChecker::IsGoodString(strValue) ||
+ !Internat::CompatibleToDouble(strValue, &dblValue))
+ return false;
+ f = dblValue;
}
// Get the dB
else if( !wxStrcmp( attr, wxT("d") ) )
{
- d = Internat::CompatibleToDouble( value );
+ if (!XMLValueChecker::IsGoodString(strValue) ||
+ !Internat::CompatibleToDouble(strValue, &dblValue))
+ return false;
+ d = dblValue;
}
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs