summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--plugins/dfOpenGL/cfg.c18
2 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 86d16709..e4ad1a99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@ May 31, 2009 Wei Mingzhi <weimingzhi@gmail.com>
* gui/Config.c, plugins/dfxvideo/cfg.c: Fixed invalid memory access.
* debian/control: Added libxxf86vm-dev to Build-Depend.
+ * plugins/dfOpenGL/cfg.c: Don't use sprintf().
May 30, 2009 Wei Mingzhi <weimingzhi@gmail.com>
diff --git a/plugins/dfOpenGL/cfg.c b/plugins/dfOpenGL/cfg.c
index c048da68..6270e54a 100644
--- a/plugins/dfOpenGL/cfg.c
+++ b/plugins/dfOpenGL/cfg.c
@@ -86,20 +86,26 @@ void ExecCfg(char *arg) {
strcpy(cfg, "./cfgDFOpenGL");
if (stat(cfg, &buf) != -1) {
- sprintf(cfg, "%s %s", cfg, arg);
- system(cfg); return;
+ strcat(cfg, " ");
+ strcat(cfg, arg);
+ system(cfg);
+ return;
}
strcpy(cfg, "./cfg/cfgDFOpenGL");
if (stat(cfg, &buf) != -1) {
- sprintf(cfg, "%s %s", cfg, arg);
- system(cfg); return;
+ strcat(cfg, " ");
+ strcat(cfg, arg);
+ system(cfg);
+ return;
}
sprintf(cfg, "%s/.pcsx/plugins/cfg/cfgDFOpenGL", getenv("HOME"));
if (stat(cfg, &buf) != -1) {
- sprintf(cfg, "%s %s", cfg, arg);
- system(cfg); return;
+ strcat(cfg, " ");
+ strcat(cfg, arg);
+ system(cfg);
+ return;
}
printf("ERROR: cfgDFOpenGL file not found!\n");