From 6459917c0ae092e64ebd77a2bbb84e16d8b46e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Aragunde=20P=C3=A9rez?= Date: Mon, 16 Sep 2024 09:08:22 +0000 Subject: [PATCH] Fix index out of bounds with dialog accept_types description (fixes #3779) --- libcef/browser/file_dialog_manager.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libcef/browser/file_dialog_manager.cc b/libcef/browser/file_dialog_manager.cc index 3c9532403..39bc89b24 100644 --- a/libcef/browser/file_dialog_manager.cc +++ b/libcef/browser/file_dialog_manager.cc @@ -515,7 +515,9 @@ CefFileDialogManager::MaybeRunDelegate( ext_str += FilePathTypeToString16(FILE_PATH_LITERAL(".") + ext); } accept_extensions.push_back(ext_str); - accept_descriptions.push_back(descriptions[i]); + if (descriptions.size() == extensions.size()) { + accept_descriptions.push_back(descriptions[i]); + } } }