diff --git a/fb2k/foo_vgmstream.h b/fb2k/foo_vgmstream.h index 32913de5..75435417 100644 --- a/fb2k/foo_vgmstream.h +++ b/fb2k/foo_vgmstream.h @@ -39,7 +39,7 @@ class input_vgmstream { private: service_ptr_t m_file; - char filename[260]; + pfc::string8 filename; t_input_open_reason currentreason; VGMSTREAM * vgmstream; @@ -62,7 +62,7 @@ class input_vgmstream { short sample_buffer[OUTBUF_SIZE]; - void getfileinfo(char *filename, char *title, int *length_in_ms, int *total_samples, int *loop_start, int *loop_end, int *sample_rate, int *channels, abort_callback & p_abort); + void getfileinfo(const char *filename, char *title, int *length_in_ms, int *total_samples, int *loop_start, int *loop_end, int *sample_rate, int *channels, abort_callback & p_abort); void load_settings(); private: diff --git a/fb2k/foostream.cpp b/fb2k/foostream.cpp index a973114f..53ab8ddd 100644 --- a/fb2k/foostream.cpp +++ b/fb2k/foostream.cpp @@ -155,7 +155,13 @@ static void close_foo(FOO_STREAMFILE * streamfile) { } static void get_name_foo(FOO_STREAMFILE *streamfile,char *buffer,size_t length) { - strcpy_s(buffer,length,streamfile->name); + /* Most crap only cares about the filename itself */ + size_t ourlen = strlen(streamfile->name); + if (ourlen > length) { + if (length) strcpy(buffer, streamfile->name + ourlen - length + 1); + } else { + strcpy(buffer, streamfile->name); + } } static STREAMFILE * open_foo_streamfile_buffer_by_file(service_ptr_t m_file,const char * const filename, size_t buffersize, abort_callback * p_abort) { diff --git a/fb2k/in_vgmstream.cpp b/fb2k/in_vgmstream.cpp index 5d13b518..6f54d544 100644 --- a/fb2k/in_vgmstream.cpp +++ b/fb2k/in_vgmstream.cpp @@ -55,7 +55,7 @@ VGMSTREAM * input_vgmstream::init_vgmstream_foo(const char * const filename, abo void input_vgmstream::open(service_ptr_t p_filehint,const char * p_path,t_input_open_reason p_reason,abort_callback & p_abort) { currentreason = p_reason; - if(p_path) strcpy(filename, p_path); + if(p_path) filename = p_path; /* KLUDGE */ if ( !pfc::stricmp_ascii( pfc::string_extension( p_path ), "MUS" ) ) @@ -116,9 +116,8 @@ void input_vgmstream::get_info(file_info & p_info,abort_callback & p_abort ) { int length_in_ms=0, channels = 0, samplerate = 0; int total_samples = -1; int loop_start = -1, loop_end = -1; - char title[256]; - getfileinfo(filename, title, &length_in_ms, &total_samples, &loop_start, &loop_end, &samplerate, &channels, p_abort); + getfileinfo(filename, NULL, &length_in_ms, &total_samples, &loop_start, &loop_end, &samplerate, &channels, p_abort); p_info.info_set_int("samplerate", samplerate); p_info.info_set_int("channels", channels); @@ -543,7 +542,7 @@ bool input_vgmstream::g_is_our_path(const char * p_path,const char * p_extension /* retrieve information on this or possibly another file */ -void input_vgmstream::getfileinfo(char *filename, char *title, int *length_in_ms, int *total_samples, int *loop_start, int *loop_end, int *sample_rate, int *channels, abort_callback & p_abort) { +void input_vgmstream::getfileinfo(const char *filename, char *title, int *length_in_ms, int *total_samples, int *loop_start, int *loop_end, int *sample_rate, int *channels, abort_callback & p_abort) { VGMSTREAM * infostream; if (length_in_ms) @@ -568,7 +567,7 @@ void input_vgmstream::getfileinfo(char *filename, char *title, int *length_in_ms } if (title) { - char *p=filename+strlen(filename); + const char *p=filename+strlen(filename); while (*p != '\\' && p >= filename) p--; strcpy(title,++p); } diff --git a/fb2k/version.h b/fb2k/version.h index dfb918af..bae0eee7 100755 --- a/fb2k/version.h +++ b/fb2k/version.h @@ -1 +1 @@ -#define VERSION "r1004.1" +#define VERSION "r1004.2" diff --git a/src/meta/2dx9.c b/src/meta/2dx9.c index cecbd88a..14912d71 100644 --- a/src/meta/2dx9.c +++ b/src/meta/2dx9.c @@ -4,7 +4,7 @@ /* 2DX9 (found in beatmaniaIIDX16 - EMPRESS (Arcade) */ VGMSTREAM * init_vgmstream_2dx9(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/Cstr.c b/src/meta/Cstr.c index 0cd2867a..917f2a9d 100644 --- a/src/meta/Cstr.c +++ b/src/meta/Cstr.c @@ -6,7 +6,7 @@ VGMSTREAM * init_vgmstream_Cstr(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag; off_t start_offset; diff --git a/src/meta/aax.c b/src/meta/aax.c index 12d62c8e..47b02f29 100644 --- a/src/meta/aax.c +++ b/src/meta/aax.c @@ -113,7 +113,7 @@ VGMSTREAM * init_vgmstream_aax(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * streamFileAAX = NULL; STREAMFILE * streamFileADX = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t *segment_offset = NULL; off_t *segment_size = NULL; int32_t sample_count; @@ -746,7 +746,7 @@ static struct offset_size_pair query_utf_data(STREAMFILE *infile, const long off VGMSTREAM * init_vgmstream_utf_dsp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int table_error = 0; int loop_flag = 0; diff --git a/src/meta/acm.c b/src/meta/acm.c index c58e5967..e91a9cb7 100644 --- a/src/meta/acm.c +++ b/src/meta/acm.c @@ -10,7 +10,7 @@ VGMSTREAM * init_vgmstream_acm(STREAMFILE *streamFile) { ACMStream *acm_stream = NULL; mus_acm_codec_data *data; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag = 0; int channel_count; diff --git a/src/meta/ads.c b/src/meta/ads.c index c018d38f..0ec46e7b 100644 --- a/src/meta/ads.c +++ b/src/meta/ads.c @@ -4,7 +4,7 @@ /* ADS (from Gauntlet Dark Legends (GC)) */ VGMSTREAM * init_vgmstream_ads(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/adx_header.c b/src/meta/adx_header.c index 7cf2fa50..7cac3d17 100644 --- a/src/meta/adx_header.c +++ b/src/meta/adx_header.c @@ -25,7 +25,7 @@ VGMSTREAM * init_vgmstream_adx(STREAMFILE *streamFile) { meta_t header_type; int16_t coef1, coef2; uint16_t cutoff; - char filename[260]; + char filename[PATH_LIMIT]; int coding_type = coding_CRI_ADX; uint16_t xor_start=0,xor_mult=0,xor_add=0; diff --git a/src/meta/afc_header.c b/src/meta/afc_header.c index d7bec9c0..904a101c 100644 --- a/src/meta/afc_header.c +++ b/src/meta/afc_header.c @@ -3,7 +3,7 @@ VGMSTREAM * init_vgmstream_afc(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag; const int channel_count = 2; /* .afc seems to be stereo only */ diff --git a/src/meta/agsc.c b/src/meta/agsc.c index 4388df1c..d2f55b42 100644 --- a/src/meta/agsc.c +++ b/src/meta/agsc.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_agsc(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t header_offset; off_t start_offset; diff --git a/src/meta/ahx.c b/src/meta/ahx.c index cce0040b..908cd75a 100644 --- a/src/meta/ahx.c +++ b/src/meta/ahx.c @@ -12,7 +12,7 @@ VGMSTREAM * init_vgmstream_ahx(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; off_t stream_offset; size_t filesize; - char filename[260]; + char filename[PATH_LIMIT]; int channel_count = 1; int loop_flag = 0; mpeg_codec_data *data = NULL; diff --git a/src/meta/aifc.c b/src/meta/aifc.c index d136ec72..d46617e1 100644 --- a/src/meta/aifc.c +++ b/src/meta/aifc.c @@ -55,7 +55,7 @@ uint32_t find_marker(STREAMFILE *streamFile, off_t MarkerChunkOffset, VGMSTREAM * init_vgmstream_aifc(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t file_size = -1; int channel_count = 0; diff --git a/src/meta/aix.c b/src/meta/aix.c index 8ee07bd9..840af854 100644 --- a/src/meta/aix.c +++ b/src/meta/aix.c @@ -20,7 +20,7 @@ VGMSTREAM * init_vgmstream_aix(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * streamFileAIX = NULL; STREAMFILE * streamFileADX = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t *segment_offset = NULL; int32_t *samples_in_segment = NULL; int32_t sample_count; diff --git a/src/meta/apple_caff.c b/src/meta/apple_caff.c index dc229675..f2ab60d5 100644 --- a/src/meta/apple_caff.c +++ b/src/meta/apple_caff.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_apple_caff(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset = 0; off_t data_size = 0; diff --git a/src/meta/ast.c b/src/meta/ast.c index ffcf8067..fde88172 100644 --- a/src/meta/ast.c +++ b/src/meta/ast.c @@ -4,7 +4,7 @@ VGMSTREAM * init_vgmstream_ast(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; coding_t coding_type; diff --git a/src/meta/baf.c b/src/meta/baf.c index 51cabfd8..cbd57315 100644 --- a/src/meta/baf.c +++ b/src/meta/baf.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_baf(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t WAVE_size,DATA_size; off_t start_offset; long sample_count; diff --git a/src/meta/bgw.c b/src/meta/bgw.c index 4bc0b198..841d95d6 100644 --- a/src/meta/bgw.c +++ b/src/meta/bgw.c @@ -4,7 +4,7 @@ /* BGW (FF XI) */ VGMSTREAM * init_vgmstream_bgw(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int32_t loop_start; @@ -74,7 +74,7 @@ fail: /* .spw (SEWave, PlayOnline viewer for FFXI), very similar to bgw */ VGMSTREAM * init_vgmstream_spw(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/bnsf.c b/src/meta/bnsf.c index 2381f1bf..de9a59ec 100644 --- a/src/meta/bnsf.c +++ b/src/meta/bnsf.c @@ -8,7 +8,7 @@ VGMSTREAM * init_vgmstream_bnsf(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t file_size = -1; uint32_t riff_size; diff --git a/src/meta/brstm.c b/src/meta/brstm.c index 168e7b7a..24999997 100644 --- a/src/meta/brstm.c +++ b/src/meta/brstm.c @@ -3,7 +3,7 @@ VGMSTREAM * init_vgmstream_brstm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; coding_t coding_type; diff --git a/src/meta/capdsp.c b/src/meta/capdsp.c index 197245fb..774052f5 100644 --- a/src/meta/capdsp.c +++ b/src/meta/capdsp.c @@ -4,7 +4,7 @@ /* CAPDSP (found in Capcom games) */ VGMSTREAM * init_vgmstream_capdsp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/dc_asd.c b/src/meta/dc_asd.c index aae03096..552eb787 100644 --- a/src/meta/dc_asd.c +++ b/src/meta/dc_asd.c @@ -4,7 +4,7 @@ /* ASD - found in Miss Moonlight (DC) */ VGMSTREAM * init_vgmstream_dc_asd(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/dc_dcsw_dcs.c b/src/meta/dc_dcsw_dcs.c index 6f1ba5af..128c7a7d 100644 --- a/src/meta/dc_dcsw_dcs.c +++ b/src/meta/dc_dcsw_dcs.c @@ -12,7 +12,7 @@ VGMSTREAM * init_vgmstream_dc_dcsw_dcs(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * streamFileDCSW = NULL; - char filename[260]; + char filename[PATH_LIMIT]; char filenameDCSW[260]; int i; int channel_count; diff --git a/src/meta/dc_idvi.c b/src/meta/dc_idvi.c index 7473fdb7..60df792a 100644 --- a/src/meta/dc_idvi.c +++ b/src/meta/dc_idvi.c @@ -4,7 +4,7 @@ /* IDVI (Eldorado Gate Volume 1-7) */ VGMSTREAM * init_vgmstream_dc_idvi(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/dc_kcey.c b/src/meta/dc_kcey.c index 7fbf5584..abf9f663 100644 --- a/src/meta/dc_kcey.c +++ b/src/meta/dc_kcey.c @@ -4,7 +4,7 @@ VGMSTREAM * init_vgmstream_kcey(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/dc_str.c b/src/meta/dc_str.c index faebf5b3..9bac3c36 100644 --- a/src/meta/dc_str.c +++ b/src/meta/dc_str.c @@ -7,7 +7,7 @@ VGMSTREAM * init_vgmstream_dc_str(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int interleave; @@ -102,7 +102,7 @@ fail: VGMSTREAM * init_vgmstream_dc_str_v2(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/de2.c b/src/meta/de2.c index f1b051eb..83f004a7 100644 --- a/src/meta/de2.c +++ b/src/meta/de2.c @@ -7,7 +7,7 @@ VGMSTREAM * init_vgmstream_de2(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t riff_off; int channel_count; diff --git a/src/meta/dmsg_segh.c b/src/meta/dmsg_segh.c index 1f0e8637..5757ff1c 100644 --- a/src/meta/dmsg_segh.c +++ b/src/meta/dmsg_segh.c @@ -7,7 +7,7 @@ */ VGMSTREAM * init_vgmstream_dmsg(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag = 0; int frequency; int channel_count; diff --git a/src/meta/dsp_bdsp.c b/src/meta/dsp_bdsp.c index b3bdd11a..d71b7141 100644 --- a/src/meta/dsp_bdsp.c +++ b/src/meta/dsp_bdsp.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_dsp_bdsp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int channel_count; int loop_flag; int i; diff --git a/src/meta/dsp_sth_str.c b/src/meta/dsp_sth_str.c index b19f3a55..e601b6b1 100644 --- a/src/meta/dsp_sth_str.c +++ b/src/meta/dsp_sth_str.c @@ -9,7 +9,7 @@ VGMSTREAM * init_vgmstream_ngc_dsp_sth_str1(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * streamFileSTR = NULL; - char filename[260]; + char filename[PATH_LIMIT]; char filenameSTR[260]; int i, j; int channel_count; @@ -115,7 +115,7 @@ fail: VGMSTREAM * init_vgmstream_ngc_dsp_sth_str2(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * streamFileSTR = NULL; - char filename[260]; + char filename[PATH_LIMIT]; char filenameSTR[260]; int i, j; int channel_count; @@ -221,7 +221,7 @@ fail: VGMSTREAM * init_vgmstream_ngc_dsp_sth_str3(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * streamFileSTR = NULL; - char filename[260]; + char filename[PATH_LIMIT]; char filenameSTR[260]; int i, j; int channel_count; diff --git a/src/meta/ea_header.c b/src/meta/ea_header.c index 6f2cf50e..0da2d047 100644 --- a/src/meta/ea_header.c +++ b/src/meta/ea_header.c @@ -136,7 +136,7 @@ void Parse_Header(STREAMFILE* streamFile,EA_STRUCT* ea, off_t offset, int length VGMSTREAM * init_vgmstream_ea(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; EA_STRUCT ea; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/ea_old.c b/src/meta/ea_old.c index 13d92575..d3eaa402 100644 --- a/src/meta/ea_old.c +++ b/src/meta/ea_old.c @@ -20,7 +20,7 @@ typedef struct VGMSTREAM * init_vgmstream_eacs(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int channel_count; int loop_flag=0; char little_endian=0; diff --git a/src/meta/emff.c b/src/meta/emff.c index 579c72cf..10cb7645 100644 --- a/src/meta/emff.c +++ b/src/meta/emff.c @@ -6,7 +6,7 @@ Legacy of Kain - Defiance, possibly more... */ VGMSTREAM * init_vgmstream_emff_ps2(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; @@ -79,7 +79,7 @@ fail: found in Tomb Raider Legend/Anniversary/Underworld, possibly more... */ VGMSTREAM * init_vgmstream_emff_ngc(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/exakt_sc.c b/src/meta/exakt_sc.c index 70ca1c8d..59c05172 100644 --- a/src/meta/exakt_sc.c +++ b/src/meta/exakt_sc.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_exakt_sc(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; size_t file_size; diff --git a/src/meta/excitebots.c b/src/meta/excitebots.c index f5f92468..831145a0 100644 --- a/src/meta/excitebots.c +++ b/src/meta/excitebots.c @@ -7,7 +7,7 @@ /* .sfx, some .sf0 - DSP and PCM */ VGMSTREAM * init_vgmstream_eb_sfx(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; @@ -114,7 +114,7 @@ fail: /* .sf0 - PCM (degenerate stereo .sfx?) */ VGMSTREAM * init_vgmstream_eb_sf0(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag = 0; int channel_count; long file_size; diff --git a/src/meta/ffw.c b/src/meta/ffw.c index c7ae629a..cc2d0a26 100644 --- a/src/meta/ffw.c +++ b/src/meta/ffw.c @@ -4,7 +4,7 @@ /* FFW (from Freedom Fighters [NGC]) */ VGMSTREAM * init_vgmstream_ffw(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/fsb.c b/src/meta/fsb.c index 8cf9d7a2..c20cdf6b 100644 --- a/src/meta/fsb.c +++ b/src/meta/fsb.c @@ -6,7 +6,7 @@ VGMSTREAM * init_vgmstream_fsb1(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; /* int fsb1_included_files; */ @@ -85,7 +85,7 @@ fail: /* FSB3.0 and FSB3.1 */ VGMSTREAM * init_vgmstream_fsb3(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int fsb_headerlen; int channel_count; int loop_flag = 0; @@ -230,7 +230,7 @@ fail: /* FSB4 */ VGMSTREAM * init_vgmstream_fsb4(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int fsb4_format; @@ -450,7 +450,7 @@ fail: 16 byte "WAV" header which holds the filesize...*/ VGMSTREAM * init_vgmstream_fsb4_wav(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; @@ -533,7 +533,7 @@ fail: // FSB3 & FSB4 MPEG TEST VGMSTREAM * init_vgmstream_fsb_mpeg(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int channel_count, channels, encoding, loop_flag, fsb_mainheader_len, fsb_subheader_len, FSBFlag; long sample_rate = 0, num_samples = 0, rate; @@ -687,7 +687,7 @@ fail: // FSB5 MPEG VGMSTREAM * init_vgmstream_fsb5_mpeg(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int channel_count, channels, encoding, loop_flag, fsb_mainheader_len, fsb_subheader_len, FSBFlag; long sample_rate = 0, num_samples = 0, rate; diff --git a/src/meta/gca.c b/src/meta/gca.c index f6ff5bbd..f48f9014 100644 --- a/src/meta/gca.c +++ b/src/meta/gca.c @@ -4,7 +4,7 @@ /* GCA (from Metal Slug Anthology [Wii]) */ VGMSTREAM * init_vgmstream_gca(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count = 1; diff --git a/src/meta/gcsw.c b/src/meta/gcsw.c index dfcbd4ad..92690ec6 100644 --- a/src/meta/gcsw.c +++ b/src/meta/gcsw.c @@ -3,7 +3,7 @@ VGMSTREAM * init_vgmstream_gcsw(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int channel_count; int loop_flag; diff --git a/src/meta/genh.c b/src/meta/genh.c index 4616d7b9..83fbe5b2 100644 --- a/src/meta/genh.c +++ b/src/meta/genh.c @@ -25,7 +25,7 @@ VGMSTREAM * init_vgmstream_genh(STREAMFILE *streamFile) { int32_t dsp_interleave_type; int32_t coef_type; - char filename[260]; + char filename[PATH_LIMIT]; int coding; /* check extension, case insensitive */ diff --git a/src/meta/gh3_bar.c b/src/meta/gh3_bar.c index f55223c4..b54ce2c7 100644 --- a/src/meta/gh3_bar.c +++ b/src/meta/gh3_bar.c @@ -21,7 +21,7 @@ VGMSTREAM * init_vgmstream_gh3_bar(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; // don't close, this is just the source streamFile wrapped STREAMFILE* streamFileBAR = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; off_t ch2_start_offset; int loop_flag; diff --git a/src/meta/gsp_gsb.c b/src/meta/gsp_gsb.c index 32d8b2df..6847b88c 100644 --- a/src/meta/gsp_gsb.c +++ b/src/meta/gsp_gsb.c @@ -8,7 +8,7 @@ VGMSTREAM * init_vgmstream_gsp_gsb(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * streamFileGSP = NULL; - char filename[260]; + char filename[PATH_LIMIT]; char filenameGSP[260]; int channel_count; int loop_flag; diff --git a/src/meta/halpst.c b/src/meta/halpst.c index 71c7269a..32edda16 100644 --- a/src/meta/halpst.c +++ b/src/meta/halpst.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_halpst(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int channel_count; int loop_flag = 0; diff --git a/src/meta/his.c b/src/meta/his.c index 345de95f..63e2b2c2 100644 --- a/src/meta/his.c +++ b/src/meta/his.c @@ -6,7 +6,7 @@ VGMSTREAM * init_vgmstream_his(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int channel_count; int loop_flag = 0; int bps = 0; diff --git a/src/meta/idsp.c b/src/meta/idsp.c index 3af66371..a5f2ad9a 100644 --- a/src/meta/idsp.c +++ b/src/meta/idsp.c @@ -7,7 +7,7 @@ */ VGMSTREAM * init_vgmstream_idsp2(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag; int channel_count; int i, j; @@ -105,7 +105,7 @@ fail: - Single "IDSP" header... */ VGMSTREAM * init_vgmstream_idsp3(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag = 1; int channel_count; off_t start_offset; @@ -185,7 +185,7 @@ fail: /* IDSP (Defender NGC) */ VGMSTREAM * init_vgmstream_idsp4(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag = 0; int channel_count; off_t start_offset; diff --git a/src/meta/ios_psnd.c b/src/meta/ios_psnd.c index e32f83eb..c8d5e601 100644 --- a/src/meta/ios_psnd.c +++ b/src/meta/ios_psnd.c @@ -4,7 +4,7 @@ /* PSND (from Crash Bandicoot Nitro Kart 2 (iOS) */ VGMSTREAM * init_vgmstream_ios_psnd(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/ish_isd.c b/src/meta/ish_isd.c index b8b2bc0e..7078a093 100644 --- a/src/meta/ish_isd.c +++ b/src/meta/ish_isd.c @@ -9,7 +9,7 @@ VGMSTREAM * init_vgmstream_ish_isd(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * streamFileISH = NULL; - char filename[260]; + char filename[PATH_LIMIT]; char filenameISH[260]; int i; int channel_count; diff --git a/src/meta/ivaud.c b/src/meta/ivaud.c index 51fad60b..6c215828 100644 --- a/src/meta/ivaud.c +++ b/src/meta/ivaud.c @@ -6,7 +6,7 @@ VGMSTREAM * init_vgmstream_ivaud(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; off_t block_table_offset; int block_count; diff --git a/src/meta/ivb.c b/src/meta/ivb.c index 2fa303bc..19c83583 100644 --- a/src/meta/ivb.c +++ b/src/meta/ivb.c @@ -4,7 +4,7 @@ /* a simple PS2 ADPCM format seen in Langrisser 3 */ VGMSTREAM * init_vgmstream_ivb(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; off_t stream_length; diff --git a/src/meta/kraw.c b/src/meta/kraw.c index 9a077097..2fd4123e 100644 --- a/src/meta/kraw.c +++ b/src/meta/kraw.c @@ -4,7 +4,7 @@ /* KRAW (from Geometry Wars - Galaxies) */ VGMSTREAM * init_vgmstream_kraw(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/lsf.c b/src/meta/lsf.c index 4d4cd306..0f7ef2e3 100644 --- a/src/meta/lsf.c +++ b/src/meta/lsf.c @@ -6,7 +6,7 @@ VGMSTREAM * init_vgmstream_lsf_n1nj4n(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; size_t file_size; off_t start_offset; diff --git a/src/meta/mattel_hyperscan.c b/src/meta/mattel_hyperscan.c index 50bdd7ee..1601be8f 100644 --- a/src/meta/mattel_hyperscan.c +++ b/src/meta/mattel_hyperscan.c @@ -5,7 +5,7 @@ - Place all metas for this console here (there are just 5 games) */ VGMSTREAM * init_vgmstream_hyperscan_kvag(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/maxis_xa.c b/src/meta/maxis_xa.c index d3ac6107..bf0588ec 100644 --- a/src/meta/maxis_xa.c +++ b/src/meta/maxis_xa.c @@ -4,7 +4,7 @@ /* Maxis XA - found in 'Sim City 3000' */ VGMSTREAM * init_vgmstream_maxis_xa(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/mn_str.c b/src/meta/mn_str.c index fc6aa6f6..833c1743 100644 --- a/src/meta/mn_str.c +++ b/src/meta/mn_str.c @@ -3,7 +3,7 @@ VGMSTREAM * init_vgmstream_mn_str(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/mp4.c b/src/meta/mp4.c index 8f104856..853441f7 100644 --- a/src/meta/mp4.c +++ b/src/meta/mp4.c @@ -68,7 +68,7 @@ VGMSTREAM * init_vgmstream_mp4_aac(STREAMFILE *streamFile) { VGMSTREAM * init_vgmstream_mp4_aac_offset(STREAMFILE *streamFile, uint64_t start, uint64_t size) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; mp4_aac_codec_data * aac_file = ( mp4_aac_codec_data * ) calloc(1, sizeof(mp4_aac_codec_data)); diff --git a/src/meta/msvp.c b/src/meta/msvp.c index 0627dfab..687344e8 100644 --- a/src/meta/msvp.c +++ b/src/meta/msvp.c @@ -4,7 +4,7 @@ /* MSVP (from PoPcap Hits Vol. 1) */ VGMSTREAM * init_vgmstream_msvp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/musc.c b/src/meta/musc.c index 5487e53b..c0483a7e 100644 --- a/src/meta/musc.c +++ b/src/meta/musc.c @@ -4,7 +4,7 @@ /* MUSC (near all Spyro games and many other using this) */ VGMSTREAM * init_vgmstream_musc(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag; int channel_count; off_t start_offset; diff --git a/src/meta/musx.c b/src/meta/musx.c index 1eaf5b73..e174b4b2 100644 --- a/src/meta/musx.c +++ b/src/meta/musx.c @@ -5,7 +5,7 @@ /* MUSX (Version 004) --------------------------------------->*/ VGMSTREAM * init_vgmstream_musx_v004(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag; int channel_count; off_t start_offset; @@ -105,7 +105,7 @@ fail: /* MUSX (Version 005) --------------------------------------->*/ VGMSTREAM * init_vgmstream_musx_v005(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag; int channel_count; off_t start_offset; @@ -178,7 +178,7 @@ fail: /* MUSX (Version 006) ---------------------------------------> */ VGMSTREAM * init_vgmstream_musx_v006(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag; int channel_count; off_t start_offset; @@ -268,7 +268,7 @@ fail: /* WII_ in Dead Space: Extraction */ VGMSTREAM * init_vgmstream_musx_v010(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int musx_type; /* determining the decoder by strings like "PS2_", "GC__" and so on */ //int musx_version; /* 0x08 provides a "version" byte */ @@ -437,7 +437,7 @@ fail: /* MUSX (Version 201) --------------------------------------->*/ VGMSTREAM * init_vgmstream_musx_v201(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; //int musx_version; /* 0x08 provides a "version" byte */ int loop_flag; diff --git a/src/meta/myspd.c b/src/meta/myspd.c index 436d6614..cfcb6d44 100644 --- a/src/meta/myspd.c +++ b/src/meta/myspd.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_myspd(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int channel_count; int loop_flag = 0; off_t start_offset; diff --git a/src/meta/naomi_adpcm.c b/src/meta/naomi_adpcm.c index a1b6877c..7ca6ec96 100644 --- a/src/meta/naomi_adpcm.c +++ b/src/meta/naomi_adpcm.c @@ -4,7 +4,7 @@ /* ADPCM (from NAOMI/NAOMI2 Arcade games) */ VGMSTREAM * init_vgmstream_naomi_adpcm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/naomi_spsd.c b/src/meta/naomi_spsd.c index fc566918..d8d683cd 100644 --- a/src/meta/naomi_spsd.c +++ b/src/meta/naomi_spsd.c @@ -4,7 +4,7 @@ /* SPSD (Guilty Gear X [NAOMI GD-ROM]) */ VGMSTREAM * init_vgmstream_naomi_spsd(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int coding; int loop_flag; diff --git a/src/meta/nds_hwas.c b/src/meta/nds_hwas.c index 0fa40356..7774f6d8 100644 --- a/src/meta/nds_hwas.c +++ b/src/meta/nds_hwas.c @@ -4,7 +4,7 @@ /* HWAS (found in Spider-Man 3, Tony Hawk's Downhill Jam, possibly more...) */ VGMSTREAM * init_vgmstream_nds_hwas(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/nds_rrds.c b/src/meta/nds_rrds.c index f7ce9ca7..c38e9d64 100644 --- a/src/meta/nds_rrds.c +++ b/src/meta/nds_rrds.c @@ -6,7 +6,7 @@ VGMSTREAM * init_vgmstream_nds_rrds(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int channel_count; int loop_flag; off_t start_offset; diff --git a/src/meta/nds_sad.c b/src/meta/nds_sad.c index e60c0ac8..b49f91d4 100644 --- a/src/meta/nds_sad.c +++ b/src/meta/nds_sad.c @@ -4,7 +4,7 @@ /* sadl (only the Professor Layton interleaved IMA version) */ VGMSTREAM * init_vgmstream_sadl(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/nds_strm.c b/src/meta/nds_strm.c index 39fa88fa..74907203 100644 --- a/src/meta/nds_strm.c +++ b/src/meta/nds_strm.c @@ -3,7 +3,7 @@ VGMSTREAM * init_vgmstream_nds_strm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; coding_t coding_type; @@ -108,7 +108,7 @@ fail: /* STRM (from Final Fantasy Tactics A2 - Fuuketsu no Grimoire) */ VGMSTREAM * init_vgmstream_nds_strm_ffta2(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/nds_swav.c b/src/meta/nds_swav.c index 348c83ad..b3ded873 100644 --- a/src/meta/nds_swav.c +++ b/src/meta/nds_swav.c @@ -5,7 +5,7 @@ SWAV - found in Asphalt Urban GT & Asphalt Urban GT 2 */ VGMSTREAM * init_vgmstream_nds_swav(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int codec_number; int channel_count; int loop_flag; diff --git a/src/meta/ngc_adpdtk.c b/src/meta/ngc_adpdtk.c index ec547e7b..613ffcfe 100644 --- a/src/meta/ngc_adpdtk.c +++ b/src/meta/ngc_adpdtk.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_ngc_adpdtk(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * chstreamfile; - char filename[260]; + char filename[PATH_LIMIT]; size_t file_size; int i; diff --git a/src/meta/ngc_bh2pcm.c b/src/meta/ngc_bh2pcm.c index 0894827b..9fe0d3f7 100644 --- a/src/meta/ngc_bh2pcm.c +++ b/src/meta/ngc_bh2pcm.c @@ -4,7 +4,7 @@ /* BH2PCM (from Bio Hazard 2) */ VGMSTREAM * init_vgmstream_ngc_bh2pcm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int channel_count; int format_detect; diff --git a/src/meta/ngc_bo2.c b/src/meta/ngc_bo2.c index f0644d54..74ee379f 100644 --- a/src/meta/ngc_bo2.c +++ b/src/meta/ngc_bo2.c @@ -4,7 +4,7 @@ /* BO2 (Blood Omen 2 NGC) */ VGMSTREAM * init_vgmstream_ngc_bo2(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag; int channels; int channel_count; diff --git a/src/meta/ngc_caf.c b/src/meta/ngc_caf.c index 5b0c34fb..fce12488 100644 --- a/src/meta/ngc_caf.c +++ b/src/meta/ngc_caf.c @@ -4,7 +4,7 @@ VGMSTREAM * init_vgmstream_caf(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; // Calculate sample length ... int32_t num_of_samples=0; diff --git a/src/meta/ngc_dsp_konami.c b/src/meta/ngc_dsp_konami.c index ef35f770..4096a6c9 100644 --- a/src/meta/ngc_dsp_konami.c +++ b/src/meta/ngc_dsp_konami.c @@ -6,7 +6,7 @@ */ VGMSTREAM * init_vgmstream_ngc_dsp_konami(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag = 0; int channel_count; int i, j; diff --git a/src/meta/ngc_dsp_mpds.c b/src/meta/ngc_dsp_mpds.c index 5e1166f0..373088b4 100644 --- a/src/meta/ngc_dsp_mpds.c +++ b/src/meta/ngc_dsp_mpds.c @@ -4,7 +4,7 @@ /* MPDS - found in Big Air Freestyle, Terminator 3 (no coeffs), etc */ VGMSTREAM * init_vgmstream_ngc_dsp_mpds(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag = 0; int channel_count; int ch1_start=-1, ch2_start=-1; diff --git a/src/meta/ngc_dsp_std.c b/src/meta/ngc_dsp_std.c index 8b2bfc2d..81f13724 100644 --- a/src/meta/ngc_dsp_std.c +++ b/src/meta/ngc_dsp_std.c @@ -72,7 +72,7 @@ static int read_dsp_header(struct dsp_header *header, off_t offset, STREAMFILE * VGMSTREAM * init_vgmstream_ngc_dsp_std(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; struct dsp_header header; const off_t start_offset = 0x60; @@ -181,7 +181,7 @@ fail: * Cubivore calls that into question. */ VGMSTREAM * init_vgmstream_ngc_dsp_stm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; struct dsp_header ch0_header, ch1_header; int i; @@ -348,7 +348,7 @@ fail: VGMSTREAM * init_vgmstream_ngc_mpdsp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; struct dsp_header header; const off_t start_offset = 0x60; @@ -425,7 +425,7 @@ fail: */ VGMSTREAM * init_vgmstream_ngc_str(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; const off_t start_offset = 0x60; int i; @@ -486,7 +486,7 @@ fail: VGMSTREAM * init_vgmstream_ngc_dsp_std_int(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; const off_t start_offset = 0xc0; off_t interleave; @@ -599,7 +599,7 @@ fail: /* sadb - .SAD files, two standard DSP headers */ VGMSTREAM * init_vgmstream_sadb(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; off_t interleave; @@ -715,7 +715,7 @@ fail: /* AMTS - .amts files */ VGMSTREAM * init_vgmstream_amts(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; off_t interleave; @@ -833,7 +833,7 @@ fail: VGMSTREAM * init_vgmstream_wsi(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; struct dsp_header header[2]; off_t start_offset[2]; @@ -1009,7 +1009,7 @@ fail: /* SWD (found in Conflict - Desert Storm 1 & 2 */ VGMSTREAM * init_vgmstream_ngc_swd(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; off_t interleave; @@ -1125,7 +1125,7 @@ fail: The Chronicles of Narnia - Prince Caspian (Wii) */ VGMSTREAM * init_vgmstream_wii_idsp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; off_t interleave; struct dsp_header ch0_header,ch1_header; @@ -1248,7 +1248,7 @@ fail: /* found in Phantom Brave Wii */ VGMSTREAM * init_vgmstream_wii_wsd(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t channel_1_start, channel_2_start, channel_1_size, channel_2_size; @@ -1370,7 +1370,7 @@ fail: /* .ddsp files, two DSP files stuck together, without additional header */ VGMSTREAM * init_vgmstream_dsp_ddsp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t channel_1_start, channel_2_start, channel_1_size, channel_2_size; @@ -1492,7 +1492,7 @@ fail: /* .was files, DSP file(s), with additional iSWS header */ VGMSTREAM * init_vgmstream_wii_was(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; struct dsp_header ch0_header,ch1_header; off_t ch1_header_start, ch2_header_start, ch1_start, ch2_start; int channel_count; @@ -1679,7 +1679,7 @@ fail: /* .str found in Micro Machines, Superman: Shadow of Apokolips */ VGMSTREAM * init_vgmstream_dsp_str_ig(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; struct dsp_header ch0_header,ch1_header; off_t ch1_header_start, ch2_header_start, ch1_start, ch2_start; int channel_count; @@ -1791,7 +1791,7 @@ fail: always 2 channels, and an interleave of 0x8 */ VGMSTREAM * init_vgmstream_dsp_xiii(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; struct dsp_header ch0_header,ch1_header; off_t ch1_header_start, ch2_header_start, ch1_start, ch2_start; int channel_count; @@ -1902,7 +1902,7 @@ fail: /* .ndp found in Vertigo (WII) */ VGMSTREAM * init_vgmstream_wii_ndp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; struct dsp_header ch0_header,ch1_header; off_t ch1_header_start, ch2_header_start, ch1_start, ch2_start; int channel_count; @@ -2020,7 +2020,7 @@ fail: /* found in "Cabelas" games, always stereo, looped and an interleave of 0x10 bytes */ VGMSTREAM * init_vgmstream_dsp_cabelas(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; struct dsp_header ch0_header,ch1_header; off_t ch1_header_start, ch2_header_start, ch1_start, ch2_start; int channel_count; @@ -2119,7 +2119,7 @@ fail: /* dual dsp header with additional "AAAp" header, found in Vexx (NGC) and Turok: Evolution (NGC) */ VGMSTREAM * init_vgmstream_ngc_dsp_aaap(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; struct dsp_header ch0_header,ch1_header; off_t ch1_header_start, ch2_header_start, ch1_start, ch2_start; int channel_count; @@ -2234,7 +2234,7 @@ fail: /* found in Sengoku Basara 3 Wii */ VGMSTREAM * init_vgmstream_dsp_dspw(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t channel_1_start, channel_2_start; @@ -2349,7 +2349,7 @@ fail: /* dual dsp header with additional "iadp" header, found in Dr. Muto (NGC) */ VGMSTREAM * init_vgmstream_ngc_dsp_iadp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; struct dsp_header ch0_header,ch1_header; off_t ch1_header_start, ch2_header_start, ch1_start, ch2_start; int channel_count; diff --git a/src/meta/ngc_dsp_ygo.c b/src/meta/ngc_dsp_ygo.c index 50fb467f..76de70ba 100644 --- a/src/meta/ngc_dsp_ygo.c +++ b/src/meta/ngc_dsp_ygo.c @@ -10,7 +10,7 @@ VGMSTREAM * init_vgmstream_dsp_ygo(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag; int channel_count; off_t start_offset; diff --git a/src/meta/ngc_ffcc_str.c b/src/meta/ngc_ffcc_str.c index bcc18af4..ac875b1e 100644 --- a/src/meta/ngc_ffcc_str.c +++ b/src/meta/ngc_ffcc_str.c @@ -4,7 +4,7 @@ /* STR (Final Fantasy: Crystal Chronicles) */ VGMSTREAM * init_vgmstream_ngc_ffcc_str(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/ngc_gcub.c b/src/meta/ngc_gcub.c index 4cfb56c2..929fde3a 100644 --- a/src/meta/ngc_gcub.c +++ b/src/meta/ngc_gcub.c @@ -4,7 +4,7 @@ /* GCUB - found in 'Sega Soccer Slam' */ VGMSTREAM * init_vgmstream_ngc_gcub(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/ngc_lps.c b/src/meta/ngc_lps.c index 2c9f4b1d..6957a782 100644 --- a/src/meta/ngc_lps.c +++ b/src/meta/ngc_lps.c @@ -4,7 +4,7 @@ /* LPS (found in Rave Master (Groove Adventure Rave)(GC) */ VGMSTREAM * init_vgmstream_ngc_lps(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/ngc_nst_dsp.c b/src/meta/ngc_nst_dsp.c index 9b0dd1b3..98f8deb4 100644 --- a/src/meta/ngc_nst_dsp.c +++ b/src/meta/ngc_nst_dsp.c @@ -7,7 +7,7 @@ VGMSTREAM * init_vgmstream_ngc_nst_dsp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/ngc_pdt.c b/src/meta/ngc_pdt.c index 37dead58..8417c74d 100644 --- a/src/meta/ngc_pdt.c +++ b/src/meta/ngc_pdt.c @@ -4,7 +4,7 @@ /* PDT - Custom Generated File (Mario Party) */ VGMSTREAM * init_vgmstream_ngc_pdt(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag; int channel_count; off_t start_offset; diff --git a/src/meta/ngc_sck_dsp.c b/src/meta/ngc_sck_dsp.c index cb225a47..7f5610c3 100644 --- a/src/meta/ngc_sck_dsp.c +++ b/src/meta/ngc_sck_dsp.c @@ -10,7 +10,7 @@ VGMSTREAM * init_vgmstream_ngc_sck_dsp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * streamFileDSP = NULL; - char filename[260]; + char filename[PATH_LIMIT]; char filenameDSP[260]; int i; diff --git a/src/meta/ngc_ssm.c b/src/meta/ngc_ssm.c index e6253e6a..fa82d362 100644 --- a/src/meta/ngc_ssm.c +++ b/src/meta/ngc_ssm.c @@ -4,7 +4,7 @@ /* SSM (Golden Gashbell Full Power GC) */ VGMSTREAM * init_vgmstream_ngc_ssm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/ngc_tydsp.c b/src/meta/ngc_tydsp.c index bfce6949..37f3a603 100644 --- a/src/meta/ngc_tydsp.c +++ b/src/meta/ngc_tydsp.c @@ -4,7 +4,7 @@ /* TYDSP (Ty - The Tasmanian Tiger) */ VGMSTREAM * init_vgmstream_ngc_tydsp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/ngc_waa_wac_wad_wam.c b/src/meta/ngc_waa_wac_wad_wam.c index 7df00f68..c8f4905d 100644 --- a/src/meta/ngc_waa_wac_wad_wam.c +++ b/src/meta/ngc_waa_wac_wad_wam.c @@ -37,7 +37,7 @@ const short wad_coef[16] = /* Note: A "Flat Layout" has no interleave */ VGMSTREAM * init_vgmstream_waa_wac_wad_wam(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int i; off_t start_offset; int loop_flag; diff --git a/src/meta/ngc_ymf.c b/src/meta/ngc_ymf.c index 9ca6a294..9fad79ec 100644 --- a/src/meta/ngc_ymf.c +++ b/src/meta/ngc_ymf.c @@ -4,7 +4,7 @@ /* YMF (WWE WrestleMania X8) */ VGMSTREAM * init_vgmstream_ngc_ymf(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/ngca.c b/src/meta/ngca.c index d1d5f790..271be64e 100644 --- a/src/meta/ngca.c +++ b/src/meta/ngca.c @@ -4,7 +4,7 @@ /* NGCA (from GoldenEye 007) */ VGMSTREAM * init_vgmstream_ngca(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/nub.c b/src/meta/nub.c index c32727bf..5a86426a 100644 --- a/src/meta/nub.c +++ b/src/meta/nub.c @@ -6,7 +6,7 @@ /* VAG (from Ridge Racer 7) */ VGMSTREAM * init_vgmstream_nub_vag(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/nwa.c b/src/meta/nwa.c index 5bdccea4..d3f80993 100644 --- a/src/meta/nwa.c +++ b/src/meta/nwa.c @@ -14,7 +14,7 @@ VGMSTREAM * init_vgmstream_nwa(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int i; int channel_count; int loop_flag = 0; diff --git a/src/meta/ogg_vorbis_file.c b/src/meta/ogg_vorbis_file.c index 501d40fc..a87ed4c6 100644 --- a/src/meta/ogg_vorbis_file.c +++ b/src/meta/ogg_vorbis_file.c @@ -171,7 +171,7 @@ static int close_func(void * datasource) { /* Ogg Vorbis, by way of libvorbisfile */ VGMSTREAM * init_vgmstream_ogg_vorbis(STREAMFILE *streamFile) { - char filename[260]; + char filename[PATH_LIMIT]; ov_callbacks callbacks; diff --git a/src/meta/p3d.c b/src/meta/p3d.c index 7826b47a..ebc0ab09 100644 --- a/src/meta/p3d.c +++ b/src/meta/p3d.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_p3d(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t parse_offset; off_t start_offset; size_t file_size; diff --git a/src/meta/pc_adp.c b/src/meta/pc_adp.c index 2a082210..db6949d6 100644 --- a/src/meta/pc_adp.c +++ b/src/meta/pc_adp.c @@ -4,7 +4,7 @@ /* ADP (from Balls of Steel) */ VGMSTREAM * init_vgmstream_bos_adp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/pc_mxst.c b/src/meta/pc_mxst.c index 3000660b..2e79f0f1 100644 --- a/src/meta/pc_mxst.c +++ b/src/meta/pc_mxst.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_pc_mxst(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int bits_per_sample; diff --git a/src/meta/pc_smp.c b/src/meta/pc_smp.c index 9de043d1..95f7ad5c 100644 --- a/src/meta/pc_smp.c +++ b/src/meta/pc_smp.c @@ -6,7 +6,7 @@ VGMSTREAM * init_vgmstream_pc_smp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int channel_count; off_t start_offset; diff --git a/src/meta/pc_snds.c b/src/meta/pc_snds.c index 2ca24be1..03b1d23d 100644 --- a/src/meta/pc_snds.c +++ b/src/meta/pc_snds.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_pc_snds(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; size_t file_size; int i; diff --git a/src/meta/pc_sob.c b/src/meta/pc_sob.c index 0876b8f1..d6a5d729 100644 --- a/src/meta/pc_sob.c +++ b/src/meta/pc_sob.c @@ -8,7 +8,7 @@ they are actually soundpacks, but the audio data is just streamed as one big str VGMSTREAM * init_vgmstream_sab(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE* sob = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int i; int loop_flag, channel_count, numSounds; diff --git a/src/meta/pcm.c b/src/meta/pcm.c index a905a01c..ff637106 100644 --- a/src/meta/pcm.c +++ b/src/meta/pcm.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_pcm_scd(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -69,7 +69,7 @@ fail: */ VGMSTREAM * init_vgmstream_pcm_ps2(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/pona.c b/src/meta/pona.c index 852cfb81..791c23aa 100644 --- a/src/meta/pona.c +++ b/src/meta/pona.c @@ -4,7 +4,7 @@ /* PONA (from Policenauts [3DO]) */ VGMSTREAM * init_vgmstream_pona_3do(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; @@ -67,7 +67,7 @@ fail: /* PONA (from Policenauts [PSX]) */ VGMSTREAM * init_vgmstream_pona_psx(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/pos.c b/src/meta/pos.c index 11ebe5a9..153f7b11 100644 --- a/src/meta/pos.c +++ b/src/meta/pos.c @@ -14,7 +14,7 @@ VGMSTREAM * init_vgmstream_pos(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * streamFileWAV = NULL; - char filename[260]; + char filename[PATH_LIMIT]; char filenameWAV[260]; int i; diff --git a/src/meta/ps2_2pfs.c b/src/meta/ps2_2pfs.c index 9f4c53a3..1be1bc96 100644 --- a/src/meta/ps2_2pfs.c +++ b/src/meta/ps2_2pfs.c @@ -9,7 +9,7 @@ VGMSTREAM * init_vgmstream_ps2_2pfs(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; size_t fileLength; off_t readOffset = 0; diff --git a/src/meta/ps2_adm.c b/src/meta/ps2_adm.c index f3aca47c..82e2f51b 100644 --- a/src/meta/ps2_adm.c +++ b/src/meta/ps2_adm.c @@ -5,7 +5,7 @@ /* WAD (from The golden Compass) */ VGMSTREAM * init_vgmstream_ps2_adm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag = 0; int channel_count; int i; diff --git a/src/meta/ps2_ads.c b/src/meta/ps2_ads.c index b4946938..e8316ebd 100644 --- a/src/meta/ps2_ads.c +++ b/src/meta/ps2_ads.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_ps2_ads(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/ps2_adsc.c b/src/meta/ps2_adsc.c index 4dee4fda..ad6063c9 100644 --- a/src/meta/ps2_adsc.c +++ b/src/meta/ps2_adsc.c @@ -4,7 +4,7 @@ /* ADSC (from Kenka Bancho 2: Full Throttle) */ VGMSTREAM * init_vgmstream_ps2_adsc(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/ps2_ass.c b/src/meta/ps2_ass.c index 33271d7a..1253bc43 100644 --- a/src/meta/ps2_ass.c +++ b/src/meta/ps2_ass.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_ps2_ass(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; uint8_t testBuffer[0x10]; off_t loopStart = 0; diff --git a/src/meta/ps2_ast.c b/src/meta/ps2_ast.c index 64ddfdb7..2d3f9dbf 100644 --- a/src/meta/ps2_ast.c +++ b/src/meta/ps2_ast.c @@ -4,7 +4,7 @@ /* AST */ VGMSTREAM * init_vgmstream_ps2_ast(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/ps2_aus.c b/src/meta/ps2_aus.c index 994b31af..24bb3883 100644 --- a/src/meta/ps2_aus.c +++ b/src/meta/ps2_aus.c @@ -4,7 +4,7 @@ /* AUS (found in various Capcom games) */ VGMSTREAM * init_vgmstream_aus(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps2_b1s.c b/src/meta/ps2_b1s.c index 797a3f75..2b4b464c 100644 --- a/src/meta/ps2_b1s.c +++ b/src/meta/ps2_b1s.c @@ -4,7 +4,7 @@ /* B1S (found in 7 Wonders of the Ancient World) */ VGMSTREAM * init_vgmstream_ps2_b1s(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int channel_count; off_t start_offset; diff --git a/src/meta/ps2_bg00.c b/src/meta/ps2_bg00.c index 273c08fe..4ae1362d 100644 --- a/src/meta/ps2_bg00.c +++ b/src/meta/ps2_bg00.c @@ -5,7 +5,7 @@ Note: Seems the Loop Infos are stored external... */ VGMSTREAM * init_vgmstream_bg00(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps2_bmdx.c b/src/meta/ps2_bmdx.c index 34d08102..dc0e9309 100644 --- a/src/meta/ps2_bmdx.c +++ b/src/meta/ps2_bmdx.c @@ -3,7 +3,7 @@ VGMSTREAM * init_vgmstream_ps2_bmdx(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; off_t start_offset; diff --git a/src/meta/ps2_ccc.c b/src/meta/ps2_ccc.c index c665b48a..ab2a4013 100644 --- a/src/meta/ps2_ccc.c +++ b/src/meta/ps2_ccc.c @@ -4,7 +4,7 @@ /* CCC */ VGMSTREAM * init_vgmstream_ps2_ccc(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps2_dxh.c b/src/meta/ps2_dxh.c index 2b1d1411..c9f38324 100644 --- a/src/meta/ps2_dxh.c +++ b/src/meta/ps2_dxh.c @@ -4,7 +4,7 @@ /* DXH (from Tokobot Plus - Mysteries of the Karakuri) */ VGMSTREAM * init_vgmstream_ps2_dxh(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps2_enth.c b/src/meta/ps2_enth.c index fa495b79..c3e6eb19 100644 --- a/src/meta/ps2_enth.c +++ b/src/meta/ps2_enth.c @@ -4,7 +4,7 @@ /* ENTH (from Enthusia - Professional Racing) */ VGMSTREAM * init_vgmstream_ps2_enth(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int header_check; int loop_flag; diff --git a/src/meta/ps2_exst.c b/src/meta/ps2_exst.c index 54512622..d3f5cea2 100644 --- a/src/meta/ps2_exst.c +++ b/src/meta/ps2_exst.c @@ -16,7 +16,7 @@ VGMSTREAM * init_vgmstream_ps2_exst(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/ps2_filp.c b/src/meta/ps2_filp.c index 6d3663b3..4f888bdc 100644 --- a/src/meta/ps2_filp.c +++ b/src/meta/ps2_filp.c @@ -5,7 +5,7 @@ /* FILp (Resident Evil - Dead Aim) */ VGMSTREAM * init_vgmstream_filp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps2_gbts.c b/src/meta/ps2_gbts.c index ed29b73c..0a04851b 100644 --- a/src/meta/ps2_gbts.c +++ b/src/meta/ps2_gbts.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_ps2_gbts(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/ps2_gcm.c b/src/meta/ps2_gcm.c index 522b9e92..92a07800 100644 --- a/src/meta/ps2_gcm.c +++ b/src/meta/ps2_gcm.c @@ -4,7 +4,7 @@ /* GCM (from NamCollection) */ VGMSTREAM * init_vgmstream_ps2_gcm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/ps2_hgc1.c b/src/meta/ps2_hgc1.c index 081a2f15..7588febe 100644 --- a/src/meta/ps2_hgc1.c +++ b/src/meta/ps2_hgc1.c @@ -4,7 +4,7 @@ /* hgC1 (from Knights of the Temple 2) */ VGMSTREAM * init_vgmstream_hgc1(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps2_hsf.c b/src/meta/ps2_hsf.c index 51cbbd86..ecd219d3 100644 --- a/src/meta/ps2_hsf.c +++ b/src/meta/ps2_hsf.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_ps2_hsf(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps2_iab.c b/src/meta/ps2_iab.c index 53954fc5..0d9fdb78 100644 --- a/src/meta/ps2_iab.c +++ b/src/meta/ps2_iab.c @@ -5,7 +5,7 @@ /* IAB: Ueki no Housoku - Taosu ze Robert Juudan!! (PS2) */ VGMSTREAM * init_vgmstream_ps2_iab(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag = 0; int channel_count; int i; diff --git a/src/meta/ps2_ikm.c b/src/meta/ps2_ikm.c index a14c1c67..2b16f156 100644 --- a/src/meta/ps2_ikm.c +++ b/src/meta/ps2_ikm.c @@ -4,7 +4,7 @@ /* IKM (found in Zwei!) */ VGMSTREAM * init_vgmstream_ikm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps2_ild.c b/src/meta/ps2_ild.c index 5649444b..ea6a846f 100644 --- a/src/meta/ps2_ild.c +++ b/src/meta/ps2_ild.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_ps2_ild(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; off_t start_offset; diff --git a/src/meta/ps2_int.c b/src/meta/ps2_int.c index 60a328f4..e7aa1a84 100644 --- a/src/meta/ps2_int.c +++ b/src/meta/ps2_int.c @@ -14,7 +14,7 @@ VGMSTREAM * init_vgmstream_ps2_int(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int i,channel_count; /* check extension, case insensitive */ @@ -65,7 +65,7 @@ fail: // found in Alter Echo VGMSTREAM * init_vgmstream_ps2_omu(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int i,channel_count; /* check extension, case insensitive */ diff --git a/src/meta/ps2_joe.c b/src/meta/ps2_joe.c index 00d87523..c8942f08 100644 --- a/src/meta/ps2_joe.c +++ b/src/meta/ps2_joe.c @@ -4,7 +4,7 @@ /* JOE (found in Wall-E and some more Pixar games) */ VGMSTREAM * init_vgmstream_ps2_joe(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; uint8_t testBuffer[0x10]; off_t loopStart = 0; diff --git a/src/meta/ps2_jstm.c b/src/meta/ps2_jstm.c index 03104855..bb739995 100644 --- a/src/meta/ps2_jstm.c +++ b/src/meta/ps2_jstm.c @@ -7,7 +7,7 @@ VGMSTREAM * init_vgmstream_ps2_jstm(STREAMFILE *streamFile) { off_t start_offset = 0x20; int loop_flag; int channel_count; - char filename[260]; + char filename[PATH_LIMIT]; /* check extension */ streamFile->get_name(streamFile,filename,sizeof(filename)); diff --git a/src/meta/ps2_kces.c b/src/meta/ps2_kces.c index fcecee14..6be6840c 100644 --- a/src/meta/ps2_kces.c +++ b/src/meta/ps2_kces.c @@ -4,7 +4,7 @@ /* KCES (from Dance Dance Revolution) */ VGMSTREAM * init_vgmstream_ps2_kces(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/ps2_khv.c b/src/meta/ps2_khv.c index 43831155..e700025f 100644 --- a/src/meta/ps2_khv.c +++ b/src/meta/ps2_khv.c @@ -5,7 +5,7 @@ /* VAG files with custom headers */ VGMSTREAM * init_vgmstream_ps2_khv(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag = 0; int channel_count; off_t start_offset; diff --git a/src/meta/ps2_leg.c b/src/meta/ps2_leg.c index 8fa85b9c..146bca55 100644 --- a/src/meta/ps2_leg.c +++ b/src/meta/ps2_leg.c @@ -5,7 +5,7 @@ the headers are stored seperately in the main executable... */ VGMSTREAM * init_vgmstream_leg(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps2_lpcm.c b/src/meta/ps2_lpcm.c index d07f1e78..0037cded 100644 --- a/src/meta/ps2_lpcm.c +++ b/src/meta/ps2_lpcm.c @@ -4,7 +4,7 @@ /* LPCM (from Ah! My Goddess (PS2)) */ VGMSTREAM * init_vgmstream_ps2_lpcm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/ps2_mcg.c b/src/meta/ps2_mcg.c index 383f7eda..0cb4c057 100644 --- a/src/meta/ps2_mcg.c +++ b/src/meta/ps2_mcg.c @@ -4,7 +4,7 @@ /* GUN (Gunvari Streams) */ VGMSTREAM * init_vgmstream_ps2_mcg(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps2_mib.c b/src/meta/ps2_mib.c index 7066b992..a509d2db 100644 --- a/src/meta/ps2_mib.c +++ b/src/meta/ps2_mib.c @@ -35,7 +35,7 @@ VGMSTREAM * init_vgmstream_ps2_mib(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * streamFileMIH = NULL; - char filename[260]; + char filename[PATH_LIMIT]; uint8_t mibBuffer[0x10]; uint8_t testBuffer[0x10]; diff --git a/src/meta/ps2_mic.c b/src/meta/ps2_mic.c index 89a615d2..3a1f5207 100644 --- a/src/meta/ps2_mic.c +++ b/src/meta/ps2_mic.c @@ -12,7 +12,7 @@ VGMSTREAM * init_vgmstream_ps2_mic(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/ps2_mihb.c b/src/meta/ps2_mihb.c index c76f4cde..b1dcbea6 100644 --- a/src/meta/ps2_mihb.c +++ b/src/meta/ps2_mihb.c @@ -4,7 +4,7 @@ /* MIHB (Merged MIH+MIB) */ VGMSTREAM * init_vgmstream_ps2_mihb(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int mib_blocks; int loop_flag = 0; diff --git a/src/meta/ps2_msa.c b/src/meta/ps2_msa.c index 19dc6721..6ad75cec 100644 --- a/src/meta/ps2_msa.c +++ b/src/meta/ps2_msa.c @@ -4,7 +4,7 @@ /* MSA (from Psyvariar -Complete Edition-) */ VGMSTREAM * init_vgmstream_ps2_msa(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/ps2_mss.c b/src/meta/ps2_mss.c index 2f350bd3..c0a96c27 100644 --- a/src/meta/ps2_mss.c +++ b/src/meta/ps2_mss.c @@ -3,7 +3,7 @@ VGMSTREAM * init_vgmstream_ps2_mss(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps2_mtaf.c b/src/meta/ps2_mtaf.c index 93e138c8..8465e356 100644 --- a/src/meta/ps2_mtaf.c +++ b/src/meta/ps2_mtaf.c @@ -5,7 +5,7 @@ /* MTAF (Metal Gear Solid 3: Snake Eater) */ VGMSTREAM * init_vgmstream_ps2_mtaf(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int stream_count; diff --git a/src/meta/ps2_npsf.c b/src/meta/ps2_npsf.c index e13ccaec..9bad95ca 100644 --- a/src/meta/ps2_npsf.c +++ b/src/meta/ps2_npsf.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_ps2_npsf(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/ps2_p2bt.c b/src/meta/ps2_p2bt.c index ff34cd84..674177d1 100644 --- a/src/meta/ps2_p2bt.c +++ b/src/meta/ps2_p2bt.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_ps2_p2bt(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/ps2_pnb.c b/src/meta/ps2_pnb.c index d0d1e7dc..86dc606e 100644 --- a/src/meta/ps2_pnb.c +++ b/src/meta/ps2_pnb.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_ps2_pnb(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/ps2_psh.c b/src/meta/ps2_psh.c index 5faebb3c..e502a1ee 100644 --- a/src/meta/ps2_psh.c +++ b/src/meta/ps2_psh.c @@ -5,7 +5,7 @@ /* probably Square Vag Stream */ VGMSTREAM * init_vgmstream_ps2_psh(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; uint8_t testBuffer[0x10]; off_t loopEnd = 0; diff --git a/src/meta/ps2_psw.c b/src/meta/ps2_psw.c index 5321b267..6ac4ffa2 100644 --- a/src/meta/ps2_psw.c +++ b/src/meta/ps2_psw.c @@ -5,7 +5,7 @@ ...coefs are missing for the dsp type... */ VGMSTREAM * init_vgmstream_ps2_psw(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps2_rnd.c b/src/meta/ps2_rnd.c index fe397344..0042359a 100644 --- a/src/meta/ps2_rnd.c +++ b/src/meta/ps2_rnd.c @@ -4,7 +4,7 @@ /* rnd (from Karaoke Revolution) */ VGMSTREAM * init_vgmstream_ps2_rnd(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/ps2_rstm.c b/src/meta/ps2_rstm.c index d903b38e..3e501c69 100644 --- a/src/meta/ps2_rstm.c +++ b/src/meta/ps2_rstm.c @@ -4,7 +4,7 @@ /* RSTM (from Midnight Club 3, Bully - Canis Canim Edit) */ VGMSTREAM * init_vgmstream_ps2_rstm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps2_rws.c b/src/meta/ps2_rws.c index 4a7c63e3..976c5e44 100644 --- a/src/meta/ps2_rws.c +++ b/src/meta/ps2_rws.c @@ -4,7 +4,7 @@ /* RWS (Silent Hill Origins, Ghost Rider, Max Payne 2) */ VGMSTREAM * init_vgmstream_rws(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/ps2_rxw.c b/src/meta/ps2_rxw.c index ac48b5aa..520a1d0f 100644 --- a/src/meta/ps2_rxw.c +++ b/src/meta/ps2_rxw.c @@ -4,7 +4,7 @@ /* RXW file (Arc the Lad) */ VGMSTREAM * init_vgmstream_ps2_rxw(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; off_t start_offset; diff --git a/src/meta/ps2_sfs.c b/src/meta/ps2_sfs.c index 825e675f..ebe04561 100644 --- a/src/meta/ps2_sfs.c +++ b/src/meta/ps2_sfs.c @@ -4,7 +4,7 @@ /* SFS (from Baroque) */ VGMSTREAM * init_vgmstream_sfs(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/ps2_sl3.c b/src/meta/ps2_sl3.c index 0f774b9d..b145cc50 100644 --- a/src/meta/ps2_sl3.c +++ b/src/meta/ps2_sl3.c @@ -4,7 +4,7 @@ /* SL3 (from Test Drive Unlimited, Transformers) */ VGMSTREAM * init_vgmstream_sl3(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/ps2_smpl.c b/src/meta/ps2_smpl.c index 0044f72f..0c4b76f5 100644 --- a/src/meta/ps2_smpl.c +++ b/src/meta/ps2_smpl.c @@ -4,7 +4,7 @@ /* SMPL (from Homura) */ VGMSTREAM * init_vgmstream_ps2_smpl(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/ps2_snd.c b/src/meta/ps2_snd.c index a79ca0a3..5990a7b3 100644 --- a/src/meta/ps2_snd.c +++ b/src/meta/ps2_snd.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_ps2_snd(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/ps2_spm.c b/src/meta/ps2_spm.c index 91488f64..b184407d 100644 --- a/src/meta/ps2_spm.c +++ b/src/meta/ps2_spm.c @@ -4,7 +4,7 @@ /* SPM (from Lethal Skies Elite Pilot: Team SW) */ VGMSTREAM * init_vgmstream_ps2_spm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/ps2_sps.c b/src/meta/ps2_sps.c index 55ac150a..f08906c2 100644 --- a/src/meta/ps2_sps.c +++ b/src/meta/ps2_sps.c @@ -4,7 +4,7 @@ /* SPS (from Ape Escape 2) */ VGMSTREAM * init_vgmstream_ps2_sps(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/ps2_ster.c b/src/meta/ps2_ster.c index 0e6a39ba..f56e57c5 100644 --- a/src/meta/ps2_ster.c +++ b/src/meta/ps2_ster.c @@ -4,7 +4,7 @@ /* STER (from Juuni Kokuki: Kakukaku Taru Ou Michi Beni Midori no Uka) */ VGMSTREAM * init_vgmstream_ps2_ster(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/ps2_stm.c b/src/meta/ps2_stm.c index 6a9f7128..5e391dba 100644 --- a/src/meta/ps2_stm.c +++ b/src/meta/ps2_stm.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_ps2_stm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/ps2_str.c b/src/meta/ps2_str.c index b9e77029..d02dcba1 100644 --- a/src/meta/ps2_str.c +++ b/src/meta/ps2_str.c @@ -10,7 +10,7 @@ VGMSTREAM * init_vgmstream_ps2_str(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * infileSTH = NULL; - char filename[260]; + char filename[PATH_LIMIT]; char * filenameSTH = NULL; diff --git a/src/meta/ps2_strlr.c b/src/meta/ps2_strlr.c index a35b0d04..cdfe4a14 100644 --- a/src/meta/ps2_strlr.c +++ b/src/meta/ps2_strlr.c @@ -5,7 +5,7 @@ /* STR: The Bouncer (PS2) */ VGMSTREAM * init_vgmstream_ps2_strlr(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag = 0; int channel_count; int i; diff --git a/src/meta/ps2_svag.c b/src/meta/ps2_svag.c index c9ddd30f..ee920418 100644 --- a/src/meta/ps2_svag.c +++ b/src/meta/ps2_svag.c @@ -14,7 +14,7 @@ VGMSTREAM * init_vgmstream_ps2_svag(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/ps2_tec.c b/src/meta/ps2_tec.c index 42abe5bf..270f2456 100644 --- a/src/meta/ps2_tec.c +++ b/src/meta/ps2_tec.c @@ -5,7 +5,7 @@ /* probably TECMO Vag Stream */ VGMSTREAM * init_vgmstream_ps2_tec(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag; int channel_count; int current_chunk; diff --git a/src/meta/ps2_tk5.c b/src/meta/ps2_tk5.c index e43abf5e..631e7f78 100644 --- a/src/meta/ps2_tk5.c +++ b/src/meta/ps2_tk5.c @@ -5,7 +5,7 @@ /* TK5 (Tekken 5 Streams) */ VGMSTREAM * init_vgmstream_ps2_tk5(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; @@ -68,7 +68,7 @@ fail: /* TK1 (Tekken 5 Streams from Tekken (NamCollection)) */ VGMSTREAM * init_vgmstream_ps2_tk1(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps2_vag.c b/src/meta/ps2_vag.c index c858ffe4..5b433121 100644 --- a/src/meta/ps2_vag.c +++ b/src/meta/ps2_vag.c @@ -13,7 +13,7 @@ VGMSTREAM * init_vgmstream_ps2_vag(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; // used for loop points ... uint8_t eofVAG[16]={0x00,0x07,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77}; diff --git a/src/meta/ps2_vas.c b/src/meta/ps2_vas.c index aa25d2d1..b4e279e3 100644 --- a/src/meta/ps2_vas.c +++ b/src/meta/ps2_vas.c @@ -4,7 +4,7 @@ /* VAS (from Pro Baseball Spirits 5) */ VGMSTREAM * init_vgmstream_ps2_vas(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/ps2_vgs.c b/src/meta/ps2_vgs.c index 003aebe2..3137955b 100644 --- a/src/meta/ps2_vgs.c +++ b/src/meta/ps2_vgs.c @@ -7,7 +7,7 @@ */ VGMSTREAM * init_vgmstream_ps2_vgs(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; size_t fileLength; off_t readOffset = 0; diff --git a/src/meta/ps2_vgv.c b/src/meta/ps2_vgv.c index 055be0b1..7ffb4506 100644 --- a/src/meta/ps2_vgv.c +++ b/src/meta/ps2_vgv.c @@ -4,7 +4,7 @@ /* VGV (from Rune: Viking Warlord) */ VGMSTREAM * init_vgmstream_ps2_vgv(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps2_vms.c b/src/meta/ps2_vms.c index 3636917d..fb11ad7c 100644 --- a/src/meta/ps2_vms.c +++ b/src/meta/ps2_vms.c @@ -4,7 +4,7 @@ /* VMS (Autobahn Raser: Police Madness [SLES-53536]) */ VGMSTREAM * init_vgmstream_ps2_vms(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/ps2_voi.c b/src/meta/ps2_voi.c index 9352be0f..2d5a3868 100644 --- a/src/meta/ps2_voi.c +++ b/src/meta/ps2_voi.c @@ -4,7 +4,7 @@ /* VOI - found in "RAW Danger" (PS2) */ VGMSTREAM * init_vgmstream_ps2_voi(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag = 0; int channel_count; off_t start_offset; diff --git a/src/meta/ps2_vpk.c b/src/meta/ps2_vpk.c index 7def9785..4fc58fc4 100644 --- a/src/meta/ps2_vpk.c +++ b/src/meta/ps2_vpk.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_ps2_vpk(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/ps2_wad.c b/src/meta/ps2_wad.c index a2bdd928..9242f4cb 100644 --- a/src/meta/ps2_wad.c +++ b/src/meta/ps2_wad.c @@ -4,7 +4,7 @@ /* WAD (from The golden Compass) */ VGMSTREAM * init_vgmstream_ps2_wad(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag = 0; int channel_count; off_t start_offset; diff --git a/src/meta/ps2_wb.c b/src/meta/ps2_wb.c index f6fc5a12..49efbf6b 100644 --- a/src/meta/ps2_wb.c +++ b/src/meta/ps2_wb.c @@ -4,7 +4,7 @@ /* WB (from Shooting Love. ~TRIZEAL~) */ VGMSTREAM * init_vgmstream_ps2_wb(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/ps2_wmus.c b/src/meta/ps2_wmus.c index fb24016d..f669f78a 100644 --- a/src/meta/ps2_wmus.c +++ b/src/meta/ps2_wmus.c @@ -9,7 +9,7 @@ VGMSTREAM * init_vgmstream_ps2_wmus(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag = 1; int channel_count; diff --git a/src/meta/ps2_xa2.c b/src/meta/ps2_xa2.c index c766ea66..a16d380e 100644 --- a/src/meta/ps2_xa2.c +++ b/src/meta/ps2_xa2.c @@ -4,7 +4,7 @@ /* XA2 (XG3 Extreme-G Racing) */ VGMSTREAM * init_vgmstream_ps2_xa2(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; @@ -63,7 +63,7 @@ fail: /* XA2 (RC Revenge Pro) */ VGMSTREAM * init_vgmstream_ps2_xa2_rrp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/ps2_xa30.c b/src/meta/ps2_xa30.c index 21339e61..52770d1b 100644 --- a/src/meta/ps2_xa30.c +++ b/src/meta/ps2_xa30.c @@ -4,7 +4,7 @@ /* XA30 (found in Driver - Parallel Lines) */ VGMSTREAM * init_vgmstream_xa30(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps2_xau.c b/src/meta/ps2_xau.c index 0963613b..a662e119 100644 --- a/src/meta/ps2_xau.c +++ b/src/meta/ps2_xau.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_ps2_xau(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/ps3_cps.c b/src/meta/ps3_cps.c index 59649407..78e2a803 100644 --- a/src/meta/ps3_cps.c +++ b/src/meta/ps3_cps.c @@ -4,7 +4,7 @@ /* CPS (from Eternal Sonata) */ VGMSTREAM * init_vgmstream_ps3_cps(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/ps3_ivag.c b/src/meta/ps3_ivag.c index 44e94f70..a7d19132 100644 --- a/src/meta/ps3_ivag.c +++ b/src/meta/ps3_ivag.c @@ -9,7 +9,7 @@ VGMSTREAM * init_vgmstream_ps3_ivag(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; size_t fileLength; off_t readOffset = 0; diff --git a/src/meta/ps3_klbs.c b/src/meta/ps3_klbs.c index eea399ec..405138e6 100644 --- a/src/meta/ps3_klbs.c +++ b/src/meta/ps3_klbs.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_ps3_klbs(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; size_t fileLength; off_t readOffset = 0; diff --git a/src/meta/ps3_msf.c b/src/meta/ps3_msf.c index 8a47e02d..8d2f37cd 100644 --- a/src/meta/ps3_msf.c +++ b/src/meta/ps3_msf.c @@ -5,7 +5,7 @@ /* MSF header */ VGMSTREAM * init_vgmstream_ps3_msf(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int32_t loop_start, loop_end; int loop_flag = 0; diff --git a/src/meta/ps3_past.c b/src/meta/ps3_past.c index f4f35470..fb341698 100644 --- a/src/meta/ps3_past.c +++ b/src/meta/ps3_past.c @@ -4,7 +4,7 @@ /* .PAST (Bakugan Battle Brawlers */ VGMSTREAM * init_vgmstream_ps3_past(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/ps3_sgh_sgb.c b/src/meta/ps3_sgh_sgb.c index 8b2a7a1a..3b9b0fb0 100644 --- a/src/meta/ps3_sgh_sgb.c +++ b/src/meta/ps3_sgh_sgb.c @@ -6,7 +6,7 @@ VGMSTREAM * init_vgmstream_ps3_sgh_sgb(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; off_t start_offset = 0; STREAMFILE * streamFileSGH = NULL; - char filename[260]; + char filename[PATH_LIMIT]; char filenameSGH[260]; int channel_count; int loop_flag; @@ -78,7 +78,7 @@ fail: VGMSTREAM * init_vgmstream_ps3_sgx(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; @@ -140,7 +140,7 @@ fail: VGMSTREAM * init_vgmstream_ps3_sgd(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/ps3_vawx.c b/src/meta/ps3_vawx.c index 115f0f45..199e2993 100644 --- a/src/meta/ps3_vawx.c +++ b/src/meta/ps3_vawx.c @@ -7,7 +7,7 @@ VGMSTREAM * init_vgmstream_ps3_vawx(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; size_t fileLength; off_t readOffset = 0; diff --git a/src/meta/ps3_xvag.c b/src/meta/ps3_xvag.c index 979e7c53..f4c0fc47 100644 --- a/src/meta/ps3_xvag.c +++ b/src/meta/ps3_xvag.c @@ -9,7 +9,7 @@ VGMSTREAM * init_vgmstream_ps3_xvag(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; uint8_t testBuffer[0x10]; off_t start_offset; diff --git a/src/meta/psx_cdxa.c b/src/meta/psx_cdxa.c index 9d45dbb7..2bae4356 100644 --- a/src/meta/psx_cdxa.c +++ b/src/meta/psx_cdxa.c @@ -17,7 +17,7 @@ uint8_t AUDIO_CODING_GET_FREQ(uint8_t value) { VGMSTREAM * init_vgmstream_cdxa(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int channel_count; int headerless=0; diff --git a/src/meta/psx_fag.c b/src/meta/psx_fag.c index 21be33cb..d58a8c6b 100644 --- a/src/meta/psx_fag.c +++ b/src/meta/psx_fag.c @@ -4,7 +4,7 @@ /* FAG (Jackie Chan - Stuntmaster) */ VGMSTREAM * init_vgmstream_psx_fag(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/psx_gms.c b/src/meta/psx_gms.c index c20c7d89..e1caaf77 100644 --- a/src/meta/psx_gms.c +++ b/src/meta/psx_gms.c @@ -14,7 +14,7 @@ VGMSTREAM * init_vgmstream_psx_gms(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/psx_str_mgav.c b/src/meta/psx_str_mgav.c index a3307a8e..0951fc10 100644 --- a/src/meta/psx_str_mgav.c +++ b/src/meta/psx_str_mgav.c @@ -7,7 +7,7 @@ VGMSTREAM * init_vgmstream_psx_mgav(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; off_t start_offset; off_t current_chunk; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag = 0; int channel_count; int dataBuffer = 0; diff --git a/src/meta/raw.c b/src/meta/raw.c index 0c7ab30d..e9e21c14 100644 --- a/src/meta/raw.c +++ b/src/meta/raw.c @@ -11,7 +11,7 @@ VGMSTREAM * init_vgmstream_raw(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int i; /* check extension, case insensitive */ diff --git a/src/meta/redspark.c b/src/meta/redspark.c index a0c81483..ca982dfb 100644 --- a/src/meta/redspark.c +++ b/src/meta/redspark.c @@ -14,7 +14,7 @@ static uint32_t find_key(uint32_t firstword) { /* RSD - RedSpark (MadWorld) */ VGMSTREAM * init_vgmstream_RedSpark(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/riff.c b/src/meta/riff.c index 5276e2f1..4b3a48a4 100644 --- a/src/meta/riff.c +++ b/src/meta/riff.c @@ -177,7 +177,7 @@ fail: VGMSTREAM * init_vgmstream_riff(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; struct riff_fmt_chunk fmt; @@ -486,7 +486,7 @@ fail: VGMSTREAM * init_vgmstream_rifx(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; struct riff_fmt_chunk fmt; @@ -706,7 +706,7 @@ fail: /* XNBm (Windows 7 Phone) */ VGMSTREAM * init_vgmstream_xnbm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; struct riff_fmt_chunk fmt; diff --git a/src/meta/rkv.c b/src/meta/rkv.c index f00ea649..56f7efb3 100644 --- a/src/meta/rkv.c +++ b/src/meta/rkv.c @@ -4,7 +4,7 @@ /* RKV (from Legacy of Kain - Blood Omen 2) */ VGMSTREAM * init_vgmstream_ps2_rkv(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset=0; int loop_flag; int channel_count; diff --git a/src/meta/rs03.c b/src/meta/rs03.c index 82f57c81..03307961 100644 --- a/src/meta/rs03.c +++ b/src/meta/rs03.c @@ -6,7 +6,7 @@ VGMSTREAM * init_vgmstream_rs03(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int channel_count; int loop_flag; diff --git a/src/meta/rsd.c b/src/meta/rsd.c index 5e3d73b1..b6dfce14 100644 --- a/src/meta/rsd.c +++ b/src/meta/rsd.c @@ -5,7 +5,7 @@ /* RSD2VAG */ VGMSTREAM * init_vgmstream_rsd2vag(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -71,7 +71,7 @@ fail: /* RSD2PCMB - Big Endian */ VGMSTREAM * init_vgmstream_rsd2pcmb(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -145,7 +145,7 @@ fail: /* RSD2XADP */ VGMSTREAM * init_vgmstream_rsd2xadp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -216,7 +216,7 @@ fail: /* RSD3VAG */ VGMSTREAM * init_vgmstream_rsd3vag(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -282,7 +282,7 @@ fail: /* RSD3GADP */ VGMSTREAM * init_vgmstream_rsd3gadp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -353,7 +353,7 @@ fail: /* RSD3PCM - Little Endian */ VGMSTREAM * init_vgmstream_rsd3pcm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -427,7 +427,7 @@ fail: /* RSD3PCMB - Big Endian */ VGMSTREAM * init_vgmstream_rsd3pcmb(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -501,7 +501,7 @@ fail: /* RSD4VAG */ VGMSTREAM * init_vgmstream_rsd4vag(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -567,7 +567,7 @@ fail: /* RSD4PCM - Little Endian */ VGMSTREAM * init_vgmstream_rsd4pcm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -634,7 +634,7 @@ fail: /* RSD4PCMB - Big Endian */ VGMSTREAM * init_vgmstream_rsd4pcmb(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -699,7 +699,7 @@ fail: /* RSD4RADP */ VGMSTREAM * init_vgmstream_rsd4radp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -760,7 +760,7 @@ fail: /* RSD6RADP */ VGMSTREAM * init_vgmstream_rsd6radp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -821,7 +821,7 @@ fail: /* RSD6VAG */ VGMSTREAM * init_vgmstream_rsd6vag(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -887,7 +887,7 @@ fail: /* RSD6WADP */ VGMSTREAM * init_vgmstream_rsd6wadp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -963,7 +963,7 @@ fail: /* RSD6OGG */ VGMSTREAM * init_vgmstream_rsd6oogv(STREAMFILE *streamFile) { - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -1005,7 +1005,7 @@ fail: /* RSD6XADP */ VGMSTREAM * init_vgmstream_rsd6xadp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -1075,7 +1075,7 @@ fail: /* RSD6XMA */ VGMSTREAM * init_vgmstream_rsd6xma(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/rsf.c b/src/meta/rsf.c index 9ae8325e..864fb07a 100644 --- a/src/meta/rsf.c +++ b/src/meta/rsf.c @@ -6,7 +6,7 @@ VGMSTREAM * init_vgmstream_rsf(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; size_t file_size; diff --git a/src/meta/rwsd.c b/src/meta/rwsd.c index b4c34fdf..43bef3c1 100644 --- a/src/meta/rwsd.c +++ b/src/meta/rwsd.c @@ -89,7 +89,7 @@ static void read_rwar(struct rwav_data * rd) * single stream form here */ VGMSTREAM * init_vgmstream_rwsd(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; coding_t coding_type; diff --git a/src/meta/rwx.c b/src/meta/rwx.c index ac002795..ad61bcfb 100644 --- a/src/meta/rwx.c +++ b/src/meta/rwx.c @@ -3,7 +3,7 @@ /* RWX (found in Air Force Delta Storm (XBOX)) */ VGMSTREAM * init_vgmstream_rwx(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/s14_sss.c b/src/meta/s14_sss.c index 322aa14d..e85db981 100644 --- a/src/meta/s14_sss.c +++ b/src/meta/s14_sss.c @@ -13,7 +13,7 @@ VGMSTREAM * init_vgmstream_s14_sss(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int channel_count; size_t file_size; diff --git a/src/meta/sat_baka.c b/src/meta/sat_baka.c index dfc0f38b..8deb4613 100644 --- a/src/meta/sat_baka.c +++ b/src/meta/sat_baka.c @@ -9,7 +9,7 @@ some files should loop, but i don't know how to get the loopstart here!*/ VGMSTREAM * init_vgmstream_sat_baka(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/sat_dvi.c b/src/meta/sat_dvi.c index 8b763bed..83e019c9 100644 --- a/src/meta/sat_dvi.c +++ b/src/meta/sat_dvi.c @@ -4,7 +4,7 @@ /* DVI (Castlevania Symphony of the Night) */ VGMSTREAM * init_vgmstream_dvi(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/sat_sap.c b/src/meta/sat_sap.c index 3d1f2ba2..9e03cc63 100644 --- a/src/meta/sat_sap.c +++ b/src/meta/sat_sap.c @@ -4,7 +4,7 @@ /* SAP (from Bubble_Symphony) */ VGMSTREAM * init_vgmstream_sat_sap(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/sd9.c b/src/meta/sd9.c index c4923391..ad097aaf 100644 --- a/src/meta/sd9.c +++ b/src/meta/sd9.c @@ -4,7 +4,7 @@ /* SD9 (found in beatmaniaIIDX16 - EMPRESS (Arcade) */ VGMSTREAM * init_vgmstream_sd9(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/sdt.c b/src/meta/sdt.c index b389d11c..6b3f4011 100644 --- a/src/meta/sdt.c +++ b/src/meta/sdt.c @@ -4,7 +4,7 @@ /* SDT (Baldur's Gate - Dark Alliance) */ VGMSTREAM * init_vgmstream_sdt(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/seg.c b/src/meta/seg.c index bd37ba65..1a15ceda 100644 --- a/src/meta/seg.c +++ b/src/meta/seg.c @@ -4,7 +4,7 @@ /* SEG (found in Eragon) */ VGMSTREAM * init_vgmstream_seg(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/sfl.c b/src/meta/sfl.c index 8e72b341..388c9c85 100644 --- a/src/meta/sfl.c +++ b/src/meta/sfl.c @@ -74,7 +74,7 @@ VGMSTREAM * init_vgmstream_sfl(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * streamFileOGG = NULL; char filenameOGG[260]; - char filename[260]; + char filename[PATH_LIMIT]; off_t file_size = -1; diff --git a/src/meta/sli.c b/src/meta/sli.c index 6ad6eed1..621cfb84 100644 --- a/src/meta/sli.c +++ b/src/meta/sli.c @@ -18,7 +18,7 @@ VGMSTREAM * init_vgmstream_sli_ogg(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * streamFileOGG = NULL; - char filename[260]; + char filename[PATH_LIMIT]; char filenameOGG[260]; char linebuffer[260]; off_t bytes_read; diff --git a/src/meta/spt_spd.c b/src/meta/spt_spd.c index da1eb316..53d73c8f 100644 --- a/src/meta/spt_spd.c +++ b/src/meta/spt_spd.c @@ -10,7 +10,7 @@ VGMSTREAM * init_vgmstream_spt_spd(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * streamFileSPT = NULL; - char filename[260]; + char filename[PATH_LIMIT]; char filenameSPT[260]; int channel_count; int loop_flag; diff --git a/src/meta/sqex_scd.c b/src/meta/sqex_scd.c index bd232495..b3429a48 100644 --- a/src/meta/sqex_scd.c +++ b/src/meta/sqex_scd.c @@ -22,7 +22,7 @@ static STREAMFILE *open_scdint_with_STREAMFILE(STREAMFILE *file, const char * fi VGMSTREAM * init_vgmstream_sqex_scd(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset, meta_offset_offset, meta_offset, post_meta_offset, size_offset; int32_t loop_start, loop_end; diff --git a/src/meta/ss_stream.c b/src/meta/ss_stream.c index 2a8f884c..03b88c5b 100644 --- a/src/meta/ss_stream.c +++ b/src/meta/ss_stream.c @@ -115,7 +115,7 @@ For Each Block: { VGMSTREAM * init_vgmstream_ss_stream(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channels; int channel_count; diff --git a/src/meta/str_asr.c b/src/meta/str_asr.c index bfaa20f1..f1184e41 100644 --- a/src/meta/str_asr.c +++ b/src/meta/str_asr.c @@ -4,7 +4,7 @@ /* STR -ASR (from Donkey Kong Jet Race) */ VGMSTREAM * init_vgmstream_str_asr(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/str_snds.c b/src/meta/str_snds.c index a9a1ae34..b731f27c 100644 --- a/src/meta/str_snds.c +++ b/src/meta/str_snds.c @@ -10,7 +10,7 @@ VGMSTREAM * init_vgmstream_str_snds(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int channel_count; int loop_flag = 0; diff --git a/src/meta/stx.c b/src/meta/stx.c index e4e11022..ea8c845a 100644 --- a/src/meta/stx.c +++ b/src/meta/stx.c @@ -3,7 +3,7 @@ VGMSTREAM * init_vgmstream_stx(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; const int loop_flag = 0; const int channel_count = 2; /* .stx seems to be stereo only */ diff --git a/src/meta/svs.c b/src/meta/svs.c index 4e8eddd7..f78b6f0c 100644 --- a/src/meta/svs.c +++ b/src/meta/svs.c @@ -5,7 +5,7 @@ /* probably Square Vag Stream */ VGMSTREAM * init_vgmstream_svs(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/thp.c b/src/meta/thp.c index 1ce36e38..37b56cfb 100644 --- a/src/meta/thp.c +++ b/src/meta/thp.c @@ -9,7 +9,7 @@ VGMSTREAM * init_vgmstream_thp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; uint32_t maxAudioSize=0; diff --git a/src/meta/tun.c b/src/meta/tun.c index 086e9fb2..533ed0af 100644 --- a/src/meta/tun.c +++ b/src/meta/tun.c @@ -4,7 +4,7 @@ /* TUN (from LEGO Racers (PC)) */ VGMSTREAM * init_vgmstream_tun(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int channel_count; int loop_flag; diff --git a/src/meta/vgs.c b/src/meta/vgs.c index 3890780f..a2d8616a 100644 --- a/src/meta/vgs.c +++ b/src/meta/vgs.c @@ -4,7 +4,7 @@ /* VGS (from Guitar Hero Encore - Rocks the 80s) */ VGMSTREAM * init_vgmstream_vgs(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/vs.c b/src/meta/vs.c index a483ba24..9fe5ec34 100644 --- a/src/meta/vs.c +++ b/src/meta/vs.c @@ -6,7 +6,7 @@ VGMSTREAM * init_vgmstream_vs(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/vsf.c b/src/meta/vsf.c index 810b4501..002ad070 100644 --- a/src/meta/vsf.c +++ b/src/meta/vsf.c @@ -4,7 +4,7 @@ /* VSF (from Musashi: Samurai Legend) */ VGMSTREAM * init_vgmstream_ps2_vsf(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; @@ -70,7 +70,7 @@ fail: /* VSF with SMSS header (from Tiny Toon Adventures: Defenders of the Universe */ VGMSTREAM * init_vgmstream_ps2_vsf_tta(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/wii_bns.c b/src/meta/wii_bns.c index 89eb39be..34cfda30 100644 --- a/src/meta/wii_bns.c +++ b/src/meta/wii_bns.c @@ -5,7 +5,7 @@ /* BNS - Wii "Banner Sound" disc jingle */ VGMSTREAM * init_vgmstream_wii_bns(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t BNS_offset; uint32_t info_offset=0,data_offset=0; uint32_t channel_info_offset_list_offset; diff --git a/src/meta/wii_mus.c b/src/meta/wii_mus.c index a6cdd979..2f36e538 100644 --- a/src/meta/wii_mus.c +++ b/src/meta/wii_mus.c @@ -7,7 +7,7 @@ /* Doesn't seem to be working quite right yet, coef table looks odd */ VGMSTREAM * init_vgmstream_wii_mus(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; off_t interleave; diff --git a/src/meta/wii_ras.c b/src/meta/wii_ras.c index 8fd0b429..d84bc94b 100644 --- a/src/meta/wii_ras.c +++ b/src/meta/wii_ras.c @@ -4,7 +4,7 @@ /* RAS (from Donkey Kong Country Returns) */ VGMSTREAM * init_vgmstream_wii_ras(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/wii_smp.c b/src/meta/wii_smp.c index adb7040b..9ef2531a 100644 --- a/src/meta/wii_smp.c +++ b/src/meta/wii_smp.c @@ -4,7 +4,7 @@ /* SMP (Mushroom Men: The Spore Wars ) */ VGMSTREAM * init_vgmstream_wii_smp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/wii_sng.c b/src/meta/wii_sng.c index 1ba6e13a..6eb14267 100644 --- a/src/meta/wii_sng.c +++ b/src/meta/wii_sng.c @@ -4,7 +4,7 @@ /* SNG (from Excite Truck [WII]) */ VGMSTREAM * init_vgmstream_wii_sng(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int i; int loop_flag; diff --git a/src/meta/wii_str.c b/src/meta/wii_str.c index 893bda53..460a5bad 100644 --- a/src/meta/wii_str.c +++ b/src/meta/wii_str.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_wii_str(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; STREAMFILE * infileSTH = NULL; - char filename[260]; + char filename[PATH_LIMIT]; char * filenameSTH = NULL; diff --git a/src/meta/wii_sts.c b/src/meta/wii_sts.c index 5bd145c5..5f5f2f94 100644 --- a/src/meta/wii_sts.c +++ b/src/meta/wii_sts.c @@ -9,7 +9,7 @@ VGMSTREAM * init_vgmstream_wii_sts(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/wpd.c b/src/meta/wpd.c index 12a6ffd1..3bb37a2d 100644 --- a/src/meta/wpd.c +++ b/src/meta/wpd.c @@ -4,7 +4,7 @@ /* WPD (from Shuffle! (PC)) */ VGMSTREAM * init_vgmstream_wpd(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int channel_count; int loop_flag; diff --git a/src/meta/ws_aud.c b/src/meta/ws_aud.c index 4020d099..01effa48 100644 --- a/src/meta/ws_aud.c +++ b/src/meta/ws_aud.c @@ -6,7 +6,7 @@ VGMSTREAM * init_vgmstream_ws_aud(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; coding_t coding_type = -1; off_t format_offset; diff --git a/src/meta/wvs.c b/src/meta/wvs.c index cbe0c44b..163d93cf 100644 --- a/src/meta/wvs.c +++ b/src/meta/wvs.c @@ -8,7 +8,7 @@ VGMSTREAM * init_vgmstream_xbox_wvs(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; @@ -72,7 +72,7 @@ fail: */ VGMSTREAM * init_vgmstream_ngc_wvs(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/x360_tra.c b/src/meta/x360_tra.c index 010b2988..44bb321e 100644 --- a/src/meta/x360_tra.c +++ b/src/meta/x360_tra.c @@ -11,7 +11,7 @@ */ VGMSTREAM * init_vgmstream_x360_tra(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/xbox_hlwav.c b/src/meta/xbox_hlwav.c index 51131974..6a62ec3c 100644 --- a/src/meta/xbox_hlwav.c +++ b/src/meta/xbox_hlwav.c @@ -4,7 +4,7 @@ /* HLWAV (from Half Life 2 [XBOX]) */ VGMSTREAM * init_vgmstream_xbox_hlwav(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; int channel_count; diff --git a/src/meta/xbox_ims.c b/src/meta/xbox_ims.c index 6ddc01b0..08721d65 100644 --- a/src/meta/xbox_ims.c +++ b/src/meta/xbox_ims.c @@ -9,7 +9,7 @@ VGMSTREAM * init_vgmstream_xbox_matx(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/xbox_stma.c b/src/meta/xbox_stma.c index 127d3430..fb329334 100644 --- a/src/meta/xbox_stma.c +++ b/src/meta/xbox_stma.c @@ -8,7 +8,7 @@ VGMSTREAM * init_vgmstream_xbox_stma(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/xbox_wavm.c b/src/meta/xbox_wavm.c index 1c9d4c04..cc239286 100644 --- a/src/meta/xbox_wavm.c +++ b/src/meta/xbox_wavm.c @@ -11,7 +11,7 @@ VGMSTREAM * init_vgmstream_xbox_wavm(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/xbox_xmu.c b/src/meta/xbox_xmu.c index 01281f99..337674c7 100644 --- a/src/meta/xbox_xmu.c +++ b/src/meta/xbox_xmu.c @@ -8,7 +8,7 @@ VGMSTREAM * init_vgmstream_xbox_xmu(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/xbox_xvas.c b/src/meta/xbox_xvas.c index 64fb34b0..a17298c3 100644 --- a/src/meta/xbox_xvas.c +++ b/src/meta/xbox_xvas.c @@ -9,7 +9,7 @@ VGMSTREAM * init_vgmstream_xbox_xvas(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/xbox_xwav.c b/src/meta/xbox_xwav.c index ba02339a..45f55c52 100644 --- a/src/meta/xbox_xwav.c +++ b/src/meta/xbox_xwav.c @@ -12,7 +12,7 @@ VGMSTREAM * init_vgmstream_xbox_xwav(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag=0; int channel_count; diff --git a/src/meta/xss.c b/src/meta/xss.c index 8cfa3517..eecf7a19 100644 --- a/src/meta/xss.c +++ b/src/meta/xss.c @@ -4,7 +4,7 @@ /* XSS (found in Dino Crisis 3) */ VGMSTREAM * init_vgmstream_xss(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; diff --git a/src/meta/xwb.c b/src/meta/xwb.c index 89106541..78d00dd7 100644 --- a/src/meta/xwb.c +++ b/src/meta/xwb.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_xwb(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; int channel_count; @@ -102,7 +102,7 @@ fail: VGMSTREAM * init_vgmstream_xwb2(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag = 0; diff --git a/src/meta/ydsp.c b/src/meta/ydsp.c index 8a8b66c1..d4c46aa0 100644 --- a/src/meta/ydsp.c +++ b/src/meta/ydsp.c @@ -4,7 +4,7 @@ /* YDSP (from WWE Day of Reckoning) */ VGMSTREAM * init_vgmstream_ydsp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int loop_flag; int channel_count; off_t start_offset; diff --git a/src/meta/zsd.c b/src/meta/zsd.c index 72a9e915..245e49ef 100644 --- a/src/meta/zsd.c +++ b/src/meta/zsd.c @@ -5,7 +5,7 @@ VGMSTREAM * init_vgmstream_zsd(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; off_t start_offset; int loop_flag; diff --git a/src/meta/zwdsp.c b/src/meta/zwdsp.c index f43a1bb1..5b73520d 100644 --- a/src/meta/zwdsp.c +++ b/src/meta/zwdsp.c @@ -4,7 +4,7 @@ /* ZWDSP (hcs' custom DSP files from Zack & Wiki) */ VGMSTREAM * init_vgmstream_zwdsp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; - char filename[260]; + char filename[PATH_LIMIT]; int second_channel_start; int loop_flag; int channel_count = 2; diff --git a/src/vgmstream.c b/src/vgmstream.c index 5af57e33..7d596e04 100644 --- a/src/vgmstream.c +++ b/src/vgmstream.c @@ -2995,7 +2995,7 @@ const char * const dfs_pairs[][2] = { #define DFS_PAIR_COUNT (sizeof(dfs_pairs)/sizeof(dfs_pairs[0])) void try_dual_file_stereo(VGMSTREAM * opened_stream, STREAMFILE *streamFile) { - char filename[260]; + char filename[PATH_LIMIT]; char filename2[260]; char * ext; int dfs_name= -1; /*-1=no stereo, 0=opened_stream is left, 1=opened_stream is right */ diff --git a/src/vgmstream.h b/src/vgmstream.h index e3303cd7..7a36627f 100644 --- a/src/vgmstream.h +++ b/src/vgmstream.h @@ -5,6 +5,8 @@ #ifndef _VGMSTREAM_H #define _VGMSTREAM_H +enum { PATH_LIMIT = 32768 }; + /* Due mostly to licensing issues, Vorbis, MPEG, and G.722.1 decoding are * done by external libraries. * If someone wants to do a standalone build, they can do it by simply