--- ggz-client-libs-0.0.14.1/ggz-config/ggz-config.c.orig 2008-01-05 14:02:46.000000000 -0500 +++ ggz-client-libs-0.0.14.1/ggz-config/ggz-config.c 2008-11-11 15:48:51.000000000 -0500 @@ -452,12 +452,14 @@ { char *suffix = ".module.dsc"; char global_pathname[(moddest ? strlen(destdir) : 0) - + strlen(copydir) + + strlen(copydir) + 2]; + char full_pathname[strlen(global_pathname) + strlen(modname) - + strlen(suffix) + 3]; + + strlen(suffix) + 2]; char fixedmodname[strlen(modname) + 1]; unsigned int i; + if(moddest) sprintf(global_pathname, "%s/%s", destdir, copydir); else @@ -473,10 +475,11 @@ for(i = 0; i < strlen(fixedmodname); i++) { if(fixedmodname[i] == '/') fixedmodname[i] = '_'; } - sprintf(global_pathname, "%s/%s%s", global_pathname, fixedmodname, suffix); - printf(_("Preserving %s as %s...\n"), modfile, global_pathname); - return filecopy(modfile, global_pathname); + sprintf(full_pathname, "%s/%s%s", global_pathname, fixedmodname, suffix); + + printf(_("Preserving %s as %s...\n"), modfile, full_pathname); + return filecopy(modfile, full_pathname); }