[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 3e3f34d71e9 03/16: Fix ebrowse -f buffer overflow
From: |
Paul Eggert |
Subject: |
master 3e3f34d71e9 03/16: Fix ebrowse -f buffer overflow |
Date: |
Sun, 14 May 2023 22:28:24 -0400 (EDT) |
branch: master
commit 3e3f34d71e9c3c6c943580dc822afed7a3b0a861
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
Fix ebrowse -f buffer overflow
* lib-src/ebrowse.c (main): Fix buffer overflow when several -f
options are given. Found by GCC 13 -Wanalyzer-allocation-size.
---
lib-src/ebrowse.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c
index 371fa6c938b..4b71f7447e0 100644
--- a/lib-src/ebrowse.c
+++ b/lib-src/ebrowse.c
@@ -3767,8 +3767,9 @@ main (int argc, char **argv)
if (n_input_files == input_filenames_size)
{
input_filenames_size = max (10, 2 * input_filenames_size);
- input_filenames = (char **) xrealloc ((void *)input_filenames,
- input_filenames_size);
+ input_filenames = xrealloc (input_filenames,
+ (input_filenames_size
+ * sizeof *input_filenames));
}
input_filenames[n_input_files++] = xstrdup (optarg);
break;
- master updated (e7dc30c1d58 -> ebf5e4ca1cd), Paul Eggert, 2023/05/14
- master b77d357ea35 01/16: Update from Gnulib by running admin/merge-gnulib, Paul Eggert, 2023/05/14
- master 8c0671b9cbf 02/16: Avoid duplicate configure-time codeset tests, Paul Eggert, 2023/05/14
- master 3e3f34d71e9 03/16: Fix ebrowse -f buffer overflow,
Paul Eggert <=
- master 92d4bda2797 04/16: Fix movemail fd leak, Paul Eggert, 2023/05/14
- master 0c11c2ae71f 10/16: Pacify GCC 13 -Wanalyzer-out-of-bounds, Paul Eggert, 2023/05/14
- master 85c4efc9f41 14/16: Prefer UINTMAX_WIDTH in print_object, Paul Eggert, 2023/05/14
- master 919e1b81a4a 11/16: Pacify GCC 13 -Wnull-dereference in itree.c, Paul Eggert, 2023/05/14
- master 67ee74f8e55 05/16: Pacify GCC 13 -fanalyzer in tty_menu_activate, Paul Eggert, 2023/05/14
- master 0b9677a192b 07/16: Work around GCC bug 109579 in ccl.c, Paul Eggert, 2023/05/14
- master 0f5b1fcdf0b 13/16: Help GCC compute modiff_incr, Paul Eggert, 2023/05/14
- master 7166737b5c9 06/16: Work around GCC bug 109577, Paul Eggert, 2023/05/14
- master 9eef5a678c3 08/16: Do not use -Wanalyzer-fd-leak, Paul Eggert, 2023/05/14
- master 4fedd5af4cc 09/16: Work around GCC bug 109847 in buffer.c, Paul Eggert, 2023/05/14