~ubuntu-branches/ubuntu/precise/devil/precise

« back to all changes in this revision

Viewing changes to src-IL/src/il_mng.c

  • Committer: Bazaar Package Importer
  • Author(s): Bradley Smith
  • Date: 2009-01-17 15:01:18 UTC
  • mfrom: (6.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090117150118-4bwb6nmvbz4srsjl
Tags: 1.7.5-4
Actually fix CVE-2008-5262. Closes: #512122.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
//#define MNG_USE_SO
21
21
#endif
22
22
 
23
 
#ifdef _WIN32
24
 
        #if (defined(IL_USE_PRAGMA_LIBS))
25
 
                #if defined(_MSC_VER) || defined(__BORLANDC__)
26
 
                        #pragma comment(lib, "DevIL_libmng.lib")
27
 
                        #pragma comment(lib, "DevIL_lcms.lib")
28
 
                        #pragma comment(lib, "DevIL_libjpeg.lib")
29
 
                        #pragma comment(lib, "DevIL_zlib.lib")
 
23
#if defined(_WIN32) && defined(IL_USE_PRAGMA_LIBS)
 
24
        #if defined(_MSC_VER) || defined(__BORLANDC__)
 
25
                #ifndef _DEBUG
 
26
                        #pragma comment(lib, "libmng.lib")
 
27
                        #pragma comment(lib, "lcms.lib")
 
28
                        #pragma comment(lib, "libjpeg.lib")
 
29
                        #pragma comment(lib, "zlib.lib")
 
30
                #else
 
31
                        #pragma comment(lib, "libmng-d.lib")
 
32
                        #pragma comment(lib, "lcms-d.lib")
 
33
                        #pragma comment(lib, "libjpeg-d.lib")
 
34
                        #pragma comment(lib, "zlib-d.lib")
30
35
                #endif
31
36
        #endif
32
37
#endif
185
190
}
186
191
 
187
192
 
188
 
ILboolean iLoadMngInternal(ILvoid);
 
193
ILboolean iLoadMngInternal(void);
189
194
 
190
195
// Reads a file
191
 
ILboolean ilLoadMng(const ILstring FileName)
 
196
ILboolean ilLoadMng(ILconst_string FileName)
192
197
{
193
198
        ILHANDLE        MngFile;
194
199
        ILboolean       bMng = IL_FALSE;
222
227
 
223
228
 
224
229
// Reads from a memory "lump"
225
 
ILboolean ilLoadMngL(const ILvoid *Lump, ILuint Size)
 
230
ILboolean ilLoadMngL(const void *Lump, ILuint Size)
226
231
{
227
232
        iSetInputLump(Lump, Size);
228
233
        return iLoadMngInternal();
267
272
}
268
273
 
269
274
 
270
 
ILboolean iSaveMngInternal(ILvoid);
 
275
ILboolean iSaveMngInternal(void);
271
276
 
272
277
//! Writes a Mng file
273
 
ILboolean ilSaveMng(const ILstring FileName)
 
278
ILboolean ilSaveMng(ILconst_string FileName)
274
279
{
275
280
        ILHANDLE        MngFile;
276
281
        ILboolean       bMng = IL_FALSE;
304
309
 
305
310
 
306
311
//! Writes a Mng to a memory "lump"
307
 
ILboolean ilSaveMngL(ILvoid *Lump, ILuint Size)
 
312
ILboolean ilSaveMngL(void *Lump, ILuint Size)
308
313
{
309
314
        iSetOutputLump(Lump, Size);
310
315
        return iSaveMngInternal();