diff options
-rw-r--r-- | sysutils/xosview/patches/patch-ab | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sysutils/xosview/patches/patch-ab b/sysutils/xosview/patches/patch-ab new file mode 100644 index 00000000000..bdc1a879066 --- /dev/null +++ b/sysutils/xosview/patches/patch-ab @@ -0,0 +1,24 @@ +--- Xrm.cc.orig Fri May 29 04:34:30 1998 ++++ Xrm.cc Fri May 29 04:39:30 1998 +@@ -156,7 +156,7 @@ + if (xappdir != NULL) + { + char xappfile[1024]; +- sprintf (xappfile, "%s/%s", xappdir, className()); ++ snprintf (xappfile, 1024, "%s/%s", xappdir, className()); + // this did not work for XAPPLRESDIR + //if (!access (xappfile, X_OK | R_OK)) + if (!access (xappfile, R_OK)) +@@ -185,8 +185,10 @@ + // Now, check for a user resource file, and merge it in if there is one... + if ( getenv( "HOME" ) != NULL ){ + char userrfilename[1024]; +- strcpy(userrfilename, getenv("HOME")); +- strcat(userrfilename, "/.Xdefaults"); ++#define XDEFAULTS "/.Xdefaults" ++ strncpy(userrfilename, getenv("HOME"), 1024-strlen(XDEFAULTS)); ++ strcat(userrfilename, XDEFAULTS); ++#undef XDEFAULTS + // User file overrides system (_db). + XrmCombineFileDatabase (userrfilename, &_db, 1); + } |