Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/ctwm/dist Gcc complains about overflow writin...



details:   https://anonhg.NetBSD.org/xsrc/rev/408a88a8ec56
branches:  trunk
changeset: 7585:408a88a8ec56
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jul 28 14:27:35 2023 +0000

description:
Gcc complains about overflow writing 53 bytes into a region of size 35,
and it is correct for the alphabet copying line, which correctly comments
about the overflow too.

diffstat:

 external/mit/ctwm/dist/menus.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r a03929ef3782 -r 408a88a8ec56 external/mit/ctwm/dist/menus.c
--- a/external/mit/ctwm/dist/menus.c    Thu Jul 27 08:44:42 2023 +0000
+++ b/external/mit/ctwm/dist/menus.c    Fri Jul 28 14:27:35 2023 +0000
@@ -1659,7 +1659,7 @@ mk_twmkeys_entry(const FuncKey *key)
        char *ret;
        //         S+  C+  5(Mx+)  5(Ax+)
 #define MSLEN (2 + 2 + 5 * 3 + 5 * 3)
-       char modStr[MSLEN + 1];
+       char modStr[64];
        char *modStrCur = modStr;
 
        // Init



Home | Main Index | Thread Index | Old Index