File 0008-CVE-2018-13440.patch of Package audiofile.9291
diff --git a/libaudiofile/modules/ModuleState.cpp b/libaudiofile/modules/ModuleState.cpp
index 0c29d7a..5beea9f 100644
--- a/libaudiofile/modules/ModuleState.cpp
+++ b/libaudiofile/modules/ModuleState.cpp
@@ -74,7 +74,10 @@ status ModuleState::initFileModule(AFfilehandle file, Track *track)
else
m_fileModule = unit->initcompress(track, file->m_fh, file->m_seekok,
file->m_fileFormat == AF_FILE_RAWDATA, &chunkFrames);
-
+
+ if (!m_fileModule)
+ return AF_FAIL;
+
if (unit->needsRebuffer)
{
assert(unit->nativeSampleFormat == AF_SAMPFMT_TWOSCOMP);