From 78a2df52ff3f2c081b1382bcb667c69df43976a9 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Thu, 17 Nov 2011 20:41:27 +0000 Subject: use MAXPATHLEN when copying over file names git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72385 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/PcsxrController.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/macosx/PcsxrController.m b/macosx/PcsxrController.m index 1726d753..bfa9b0be 100644 --- a/macosx/PcsxrController.m +++ b/macosx/PcsxrController.m @@ -368,19 +368,19 @@ NSString *saveStatePath; url = [supportURL URLByAppendingPathComponent:@"Pcsxr/Memory Cards/Mcd001.mcr"]; str = [[url path] fileSystemRepresentation]; - if (str != nil) strncpy(Config.Mcd1, str, 255); + if (str != nil) strncpy(Config.Mcd1, str, MAXPATHLEN); url = [supportURL URLByAppendingPathComponent:@"Pcsxr/Memory Cards/Mcd002.mcr"]; str = [[url path] fileSystemRepresentation]; - if (str != nil) strncpy(Config.Mcd2, str, 255); + if (str != nil) strncpy(Config.Mcd2, str, MAXPATHLEN); url = [supportURL URLByAppendingPathComponent:@"Pcsxr/Bios"]; str = [[url path] fileSystemRepresentation]; - if (str != nil) strncpy(Config.BiosDir, str, 255); + if (str != nil) strncpy(Config.BiosDir, str, MAXPATHLEN); url = [supportURL URLByAppendingPathComponent:@"Pcsxr/Patches"]; str = [[url path] fileSystemRepresentation]; - if (str != nil) strncpy(Config.PatchesDir, str, 255); + if (str != nil) strncpy(Config.PatchesDir, str, MAXPATHLEN); } else { strcpy(Config.BiosDir, "Bios/"); strcpy(Config.PatchesDir, "Patches/"); @@ -392,7 +392,7 @@ NSString *saveStatePath; // set plugin path path = [[NSBundle mainBundle] builtInPlugInsPath]; str = [path fileSystemRepresentation]; - if (str != nil) strncpy(Config.PluginsDir, str, 255); + if (str != nil) strncpy(Config.PluginsDir, str, MAXPATHLEN); // locate a bios biosList = [[NSMutableArray alloc] init]; -- cgit v1.2.3