This patch runs "ghostscript" with the -dSAFER option, which prevents malicious PostScript files from writing and/or deleting files. -- jhb, 5/10/2000 --- xv-3.10a.old/xvps.c +++ xv-3.10a/xvps.c @@ -1577,11 +1577,20 @@ # ifndef VMS sprintf(tmp1, "-I%s ", GS_LIB); # else - sprintf(tmp1, "\"-I%s\"", GS_LIB); + sprintf(tmp1, "\"-I%s\" ", GS_LIB); # endif strcat(tmp, tmp1); #endif + + /* prevent some potential naughtiness... */ +#ifndef VMS + strcat(tmp, "-dSAFER "); +#else + strcat(tmp, "\"-dSAFER\" "); +#endif + + if (gsGeomStr) { sprintf(tmp1, "-g%s ", gsGeomStr); strcat(tmp, tmp1);