--- lib/libxview/textsw/txt_e_menu.c +++ lib/libxview/textsw/txt_e_menu.c @@ -16,7 +16,7 @@ * * 1. text.extrasMenuFilename{.} (Xdefaults) * 2. $(EXTRASMENU){.} (environment variable), - * 3. $(HOME)/.text_extras_menu{.} (home dir), + * 3. $(HOME)/.desk/text_extras_menu{.} (home dir), * 4. locale sensitive system default * ("$OPENWINHOME/lib/locale//XView/.text_extras_menu") * 4. fall back to SunView1 ("/usr/lib/.text_extras_menu") @@ -120,19 +120,19 @@ * out the home directory when port to the various UNIX flavors. */ if ((filename = getenv("HOME")) != NULL) { - (void) sprintf(tmp, "%s/.%s", filename, EXTRASMENU); + (void) snprintf(tmp, MAXPATHLEN + 1, "%s/.desk/%s", filename, EXTRASMENU); if ((result = check_filename_locale(locale, tmp, 1)) != NULL) goto found; } if ((filename = getenv("OPENWINHOME")) != NULL) { - (void) sprintf(tmp, "%s/lib/locale/%s/xview/.%s", + (void) snprintf(tmp, MAXPATHLEN + 1, "%s/lib/locale/%s/xview/.%s", filename, locale, EXTRASMENU); if ((result = check_filename_locale(NULL, tmp, 1)) != NULL) goto found; if (strcmp(locale, "C") != 0) { - (void) sprintf(tmp, "%s/lib/locale/C/xview/.%s", + (void) snprintf(tmp, MAXPATHLEN + 1, "%s/lib/locale/C/xview/.%s", filename, EXTRASMENU); if ((result = check_filename_locale(NULL, tmp, 1)) != NULL) goto found; @@ -142,20 +142,20 @@ /* Gee, still?... We will try the old fashioned way */ /* If it is never defined, EXTRASMENU is set to text_extras_menu see top of this file ... */ - (void) sprintf(tmp, "%s/lib/.%s", + (void) snprintf(tmp, MAXPATHLEN + 1, "%s/lib/.%s", filename, EXTRASMENU); if ((result = check_filename_locale(NULL, tmp, 1)) != NULL) goto found; /* EXTRASMENU is absolute specified as normally done during compile time option -DEXTRASMENU="\"$(TEXT_EXTRAS_MENU)\" */ - (void) sprintf(tmp, "%s", EXTRASMENU); + (void) snprintf(tmp, MAXPATHLEN + 1, "%s", EXTRASMENU); if ((result = check_filename_locale(NULL, tmp, 1)) != NULL) goto found; #endif } /* Giving up, try with ancient way (SunView1) */ - (void) sprintf(tmp, "/usr/lib/.%s", EXTRASMENU); + (void) sprintf(tmp, "/usr/local/lib/.%s", EXTRASMENU); result = xv_strsave(tmp); found: