#include "mathlib.h"
#include "inout.h"
#include "vfs.h"
-#include <minizip/unzip.h>
+#include <unzip.h>
#include <glib.h>
typedef struct
if ( ext != NULL && ( !Q_stricmp( ext, ".pk3dir" ) || !Q_stricmp( ext, ".dpkdir" ) ) ) {
if ( g_numDirs == VFS_MAXDIRS ) {
+ g_free( dirlist );
continue;
}
snprintf( g_strDirs[g_numDirs], PATH_MAX, "%s/%s", path, name );
}
if ( ext == NULL || ( Q_stricmp( ext, ".pk3" ) != 0 && Q_stricmp( ext, ".dpk" ) != 0 ) ) {
+ g_free( dirlist );
continue;
}
}
}
*bufferptr = NULL;
- strcpy( fixed, filename );
+ strncpy( fixed, filename, sizeof( fixed ) );
vfsFixDOSName( fixed );
lower = g_ascii_strdown( fixed, -1 );
i = unzReadCurrentFile( file->zipfile, *bufferptr, file->size );
unzCloseCurrentFile( file->zipfile );
if ( i < 0 ) {
+ g_free( lower );
return -1;
}
else{