Fix small problem with uninitialized data fed to sndfile
authorSampo Savolainen <v2@iki.fi>
Sun, 14 Jun 2009 14:40:03 +0000 (14:40 +0000)
committerSampo Savolainen <v2@iki.fi>
Sun, 14 Jun 2009 14:40:03 +0000 (14:40 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5188 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/sndfileimportable.cc

index 5cd00a8e96098e66ebd9504146e66230b972e11d..fae4dea716d02d59dc497dc62038ad0436ff8ee5 100644 (file)
@@ -6,8 +6,9 @@ using namespace ARDOUR;
 using namespace std;
 
 SndFileImportableSource::SndFileImportableSource (const string& path)
-       : in (sf_open (path.c_str(), SFM_READ, &sf_info), sf_close)
 {
+       memset(&sf_info, 0 , sizeof(sf_info));
+       in.reset( sf_open(path.c_str(), SFM_READ, &sf_info), sf_close);
        if (!in) throw failed_constructor();
 }