From c27721c47e56ef115dcde1862579637165e6b221 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Thu, 30 Jun 2005 12:46:24 +0000 Subject: FORTIFY fixes Original commit message from CVS: FORTIFY fixes --- gst/modplug/libmodplug/load_it.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'gst') diff --git a/gst/modplug/libmodplug/load_it.cpp b/gst/modplug/libmodplug/load_it.cpp index 29ea0d24..7664eb4e 100644 --- a/gst/modplug/libmodplug/load_it.cpp +++ b/gst/modplug/libmodplug/load_it.cpp @@ -1299,6 +1299,7 @@ UINT CSoundFile::SaveMixPlugins(FILE *f, BOOL bUpdate) DWORD nPluginSize; UINT nTotalSize = 0; UINT nChInfo = 0; + size_t res = 0; for (UINT i=0; iInfo, 1, sizeof(SNDMIXPLUGININFO), f); - fwrite(&m_MixPlugins[i].nPluginDataSize, 1, 4, f); + res = fwrite(s, 1, 4, f); + res = fwrite(&nPluginSize, 1, 4, f); + res = fwrite(&p->Info, 1, sizeof(SNDMIXPLUGININFO), f); + res = fwrite(&m_MixPlugins[i].nPluginDataSize, 1, 4, f); if (m_MixPlugins[i].pPluginData) { - fwrite(m_MixPlugins[i].pPluginData, 1, m_MixPlugins[i].nPluginDataSize, f); + res = fwrite(m_MixPlugins[i].pPluginData, 1, m_MixPlugins[i].nPluginDataSize, f); } } nTotalSize += nPluginSize + 8; @@ -1347,10 +1348,10 @@ UINT CSoundFile::SaveMixPlugins(FILE *f, BOOL bUpdate) if (f) { nPluginSize = 0x58464843; - fwrite(&nPluginSize, 1, 4, f); + res = fwrite(&nPluginSize, 1, 4, f); nPluginSize = nChInfo*4; - fwrite(&nPluginSize, 1, 4, f); - fwrite(chinfo, 1, nPluginSize, f); + res = fwrite(&nPluginSize, 1, 4, f); + res = fwrite(chinfo, 1, nPluginSize, f); } nTotalSize += nChInfo*4 + 8; } -- cgit v1.2.1