FLTK logo

[master] eaaf5ba - Fix crash in Zenity filechooser with badly formed filter (#665)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] eaaf5ba - Fix crash in Zenity filechooser with badly formed filter (#665) "ManoloFLTK" Jan 31, 2023  
 
commit eaaf5ba90cb9efe62b9186c60f093f8b9390f260
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Tue Jan 31 17:37:20 2023 +0100
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Tue Jan 31 17:37:20 2023 +0100

    Fix crash in Zenity filechooser with badly formed filter (#665)

 src/Fl_Native_File_Chooser_Kdialog.cxx | 1 +
 1 file changed, 1 insertion(+)

diff --git src/Fl_Native_File_Chooser_Kdialog.cxx src/Fl_Native_File_Chooser_Kdialog.cxx
index a89a74a..cab64b2 100644
--- src/Fl_Native_File_Chooser_Kdialog.cxx
+++ src/Fl_Native_File_Chooser_Kdialog.cxx
@@ -205,6 +205,7 @@ char *Fl_Kdialog_Native_File_Chooser_Driver::parse_filter(const char *f) {
   const char *r = strchr(f, '{');
   char *developed = NULL;
   if (r) { // with {}
+    if (r <= p) return NULL;
     char *lead = new char[r-p];
     memcpy(lead, p+1, (r-p)-1); lead[(r-p)-1] = 0;
     const char *r2 = strchr(r, '}');
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.