summaryrefslogtreecommitdiff
path: root/src/Fl_Native_File_Chooser_Kdialog.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-01-31 17:37:20 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-01-31 17:37:20 +0100
commiteaaf5ba90cb9efe62b9186c60f093f8b9390f260 (patch)
tree75a831a6f0f2ca1ff0935c94272b336cfd5cd26d /src/Fl_Native_File_Chooser_Kdialog.cxx
parent8ef592db1e63401d3972bef6caf8290a2e3f865e (diff)
Fix crash in Zenity filechooser with badly formed filter (#665)
Diffstat (limited to 'src/Fl_Native_File_Chooser_Kdialog.cxx')
-rw-r--r--src/Fl_Native_File_Chooser_Kdialog.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Fl_Native_File_Chooser_Kdialog.cxx b/src/Fl_Native_File_Chooser_Kdialog.cxx
index a89a74abc..cab64b217 100644
--- a/src/Fl_Native_File_Chooser_Kdialog.cxx
+++ b/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, '}');