diff options
| -rw-r--r-- | src/Fl_File_Chooser2.cxx | 22 | ||||
| -rw-r--r-- | src/Fl_File_Icon2.cxx | 12 | ||||
| -rw-r--r-- | src/Fl_Help_View.cxx | 8 |
3 files changed, 21 insertions, 21 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index 8eb5b430e..4b5292a8d 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -385,7 +385,7 @@ Fl_File_Chooser::count() { void Fl_File_Chooser::directory(const char *d)// I - Directory to change to { - char *dirptr; // Pointer into directory + char *dirptr; // Pointer into directory char fixpath[FL_PATH_MAX]; // Path with slashes converted @@ -457,8 +457,8 @@ void Fl_File_Chooser::favoritesButtonCB() { int v; // Current selection - char pathname[FL_PATH_MAX], // Pathname - menuname[FL_PATH_MAX]; // Menu name + char pathname[FL_PATH_MAX], // Pathname + menuname[FL_PATH_MAX]; // Menu name v = favoritesButton->value(); @@ -624,7 +624,7 @@ void Fl_File_Chooser::fileListCB() { char *filename, // New filename - pathname[FL_PATH_MAX]; // Full pathname to file + pathname[FL_PATH_MAX + 4]; // Full pathname to file filename = (char *)fileList->text(fileList->value()); @@ -809,7 +809,7 @@ Fl_File_Chooser::fileNameCB() directory(pathname); if (filename[0]) { - char tempname[FL_PATH_MAX]; + char tempname[FL_PATH_MAX + 4]; snprintf(tempname, sizeof(tempname), "%s/%s", directory_, filename); fileName->value(tempname); @@ -923,7 +923,7 @@ Fl_File_Chooser::filter(const char *p) // I - Pattern(s) *start, // Start of pattern *end; // End of pattern int allfiles; // Do we have a "*" pattern? - char temp[FL_PATH_MAX]; // Temporary pattern string + char temp[FL_PATH_MAX]; // Temporary pattern string // Make sure we have a pattern... @@ -967,8 +967,8 @@ Fl_File_Chooser::filter(const char *p) // I - Pattern(s) void Fl_File_Chooser::newdir() { - const char *dir; // New directory name - char pathname[FL_PATH_MAX]; // Full path of directory + const char *dir; // New directory name + char pathname[FL_PATH_MAX + 4]; // Full path of directory // Get a directory name from the user @@ -1117,7 +1117,7 @@ Fl_File_Chooser::showChoiceCB() const char *item, // Selected item *patstart; // Start of pattern char *patend; // End of pattern - char temp[FL_PATH_MAX]; // Temporary string for pattern + char temp[FL_PATH_MAX]; // Temporary string for pattern item = showChoice->text(showChoice->value()); @@ -1154,7 +1154,7 @@ void Fl_File_Chooser::update_favorites() { int i; // Looping var - char pathname[FL_PATH_MAX], // Pathname + char pathname[FL_PATH_MAX], // Pathname menuname[2048]; // Menu name const char *home; // Home directory @@ -1380,7 +1380,7 @@ Fl_File_Chooser::value(int f) // I - File number int i; // Looping var int fcount; // Number of selected files const char *name; // Current filename - static char pathname[FL_PATH_MAX]; // Filename + directory + static char pathname[FL_PATH_MAX + 4]; // Filename + directory name = fileName->value(); diff --git a/src/Fl_File_Icon2.cxx b/src/Fl_File_Icon2.cxx index 9022423b0..f11a90831 100644 --- a/src/Fl_File_Icon2.cxx +++ b/src/Fl_File_Icon2.cxx @@ -6,7 +6,7 @@ // KDE icon code donated by Maarten De Boer. // // Copyright 1999-2010 by Michael Sweet. -// Copyright 2011-2017 by Bill Spitzak and others. +// Copyright 2011-2019 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -572,10 +572,10 @@ int Fl_File_Icon::load_image(const char *ifile) // I - File to read from */ void Fl_File_Icon::load_system_icons(void) { - int i; // Looping var - Fl_File_Icon *icon; // New icons - char filename[FL_PATH_MAX]; // Filename - char icondir[FL_PATH_MAX]; // Icon directory + int i; // Looping var + Fl_File_Icon *icon; // New icons + char filename[FL_PATH_MAX + 60]; // Filename + char icondir[FL_PATH_MAX]; // Icon directory static int init = 0; // Have the icons been initialized? const char * const icondirs[] = { "Bluecurve", // Icon directories to look for, in order @@ -819,7 +819,7 @@ load_kde_mimelnk(const char *filename, // I - mimelnk filename char pattern[1024]; char mimetype[1024]; char *val; - char full_iconfilename[FL_PATH_MAX]; + char full_iconfilename[2 * FL_PATH_MAX]; Fl_File_Icon *icon; diff --git a/src/Fl_Help_View.cxx b/src/Fl_Help_View.cxx index 59d8e4c84..7a091f62e 100644 --- a/src/Fl_Help_View.cxx +++ b/src/Fl_Help_View.cxx @@ -7,7 +7,7 @@ // Image support by Matthias Melcher, Copyright 2000-2009. // // Buffer management (HV_Edit_Buffer) and more by AlbrechtS and others. -// Copyright 2011-2018 by Bill Spitzak and others. +// Copyright 2011-2019 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -2775,7 +2775,7 @@ Fl_Shared_Image * Fl_Help_View::get_image(const char *name, int W, int H) { const char *localname; // Local filename char dir[FL_PATH_MAX]; // Current directory - char temp[FL_PATH_MAX], // Temporary filename + char temp[2 * FL_PATH_MAX], // Temporary filename *tempptr; // Pointer into temporary name Fl_Shared_Image *ip; // Image pointer... @@ -2872,7 +2872,7 @@ void Fl_Help_View::follow_link(Fl_Help_Link *linkp) if (strcmp(linkp->filename, filename_) != 0 && linkp->filename[0]) { char dir[FL_PATH_MAX]; // Current directory - char temp[FL_PATH_MAX], // Temporary filename + char temp[2 * FL_PATH_MAX], // Temporary filename *tempptr; // Pointer into temporary filename @@ -3305,7 +3305,7 @@ int Fl_Help_View::load(const char *f) char *target; // Target in file char *slash; // Directory separator const char *localname; // Local filename - char error[1024]; // Error buffer + char error[2 * FL_PATH_MAX]; // Error buffer char newname[FL_PATH_MAX]; // New filename buffer // printf("load(%s)\n",f); fflush(stdout); |
