|
|
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 ] | |
|
| |