mc/lib
Andrew Borodin 3475da785f (size_trunc_len): fix Undefined Binary Operator Result.
lib/util.c:493:28: warning: The left operand of '!=' is a garbage value due to array index out of bounds [clang-analyzer-core.UndefinedBinaryOperatorResult]
  493 |     for (j = units; sfx[j] != NULL; j++)
      |                     ~~~~~~ ^

 - verify and limit input 'units' value

Found by Clang-19 Static Analyzer.

Reported-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <vmail.ru>
2024-12-22 11:39:28 +03:00
..
event Indentation using GNU indent-2.2.13. 2024-06-02 12:49:13 +03:00
filehighlight Indentation using GNU indent-2.2.13. 2024-06-02 12:49:13 +03:00
mcconfig Indentation using GNU indent-2.2.13. 2024-06-02 12:49:13 +03:00
search Cleanup cppcheck warnings. 2024-12-15 14:06:21 +03:00
skin Indentation using GNU indent-2.2.13. 2024-06-02 12:49:13 +03:00
strutil src/strutil/xstrtol.c: sync with gnulib. 2024-10-05 15:05:58 +03:00
tty Ticket #4584: re-implement mocking via weak symbols instead of symbol duplication 2024-10-19 08:56:40 +02:00
vfs Ticket #4584: re-implement mocking via weak symbols instead of symbol duplication 2024-10-19 08:56:40 +02:00
widget (quick_create_labeled_input): fix potential leak of memory. 2024-12-22 11:38:32 +03:00
charsets.c Fix typos/improve grammar in charsets.c / strutil.h 2024-10-05 15:07:13 +03:00
charsets.h (str_convert_to_input): make inline. 2021-03-14 19:30:42 +03:00
event-types.h Reimplement handling of ev_vfs_print_message_t message. 2015-11-05 14:33:21 +03:00
event.h Use argument names in function declarations. 2021-06-20 15:14:56 +03:00
file-entry.h file_entry_t: rename members: 2023-08-04 21:04:54 +03:00
filehighlight.h Move definition of file_entry_t to separate file. 2023-03-19 20:34:23 +03:00
fileloc.h Rename FISH VFS to SHELL one. 2023-10-15 16:04:39 +03:00
fs.h vfs_dirent: add new member d_len to get rid of d_name length calculation. 2024-06-02 12:41:34 +03:00
glibcompat.c glibcompat: remove g_direct_equal shim 2024-06-03 16:18:12 +02:00
glibcompat.h (mc_g_string_append_c_len): new API that extends GString one. 2024-06-02 12:41:34 +03:00
global.c Update copyright years. 2024-01-01 09:46:17 +03:00
global.h mountlist: suppress unused label warning on FreeBSD 2024-11-01 17:37:10 +01:00
hook.c Indentation using GNU indent-2.2.13. 2024-06-02 12:49:13 +03:00
hook.h fixed doxygen documentation 2012-09-10 14:29:53 +03:00
idx.h Add some files and code rom Gnulib as preparation to TAR updates. 2024-10-05 15:07:13 +03:00
intprops-internal.h Add some files and code rom Gnulib as preparation to TAR updates. 2024-10-05 15:07:13 +03:00
intprops.h Ticket #4593: tar: fix compilation on systems w/o stdckdint.h. 2024-10-08 13:02:17 +03:00
keybind.c Indentation using GNU indent-2.2.13. 2024-06-02 12:49:13 +03:00
keybind.h Rename FISH VFS to SHELL one. 2023-10-15 16:04:39 +03:00
lock.c Indentation using GNU indent-2.2.13. 2024-06-02 12:49:13 +03:00
lock.h Changed lock_file() and unlock_file() functions 2012-03-06 11:52:30 +03:00
logging.c Update copyright years. 2024-01-01 09:46:17 +03:00
logging.h Clarify __attribute ((format (printf))) usage. 2015-11-05 14:33:20 +03:00
Makefile.am Ticket #4593: tar: fix compilation on systems w/o stdckdint.h. 2024-10-08 13:02:17 +03:00
mcconfig.h Ticket #4584: re-implement mocking via weak symbols instead of symbol duplication 2024-10-19 08:56:40 +02:00
search.h Ticket #4587: mcviewer: fix BOL regex search. 2024-12-15 13:46:52 +03:00
serialize.c Indentation using GNU indent-2.2.13. 2024-06-02 12:49:13 +03:00
serialize.h lib/mcconfig: fix coding style; apply source file template. 2019-09-01 19:41:12 +03:00
shell.c Indentation using GNU indent-2.2.13. 2024-06-02 12:49:13 +03:00
shell.h Fix typos. 2020-12-31 16:26:46 +03:00
skin.h Ticket #4433: skins: add color for non-printable characters in editor. 2023-12-10 17:47:07 +03:00
stat-size.h Remove Cray support. 2020-10-13 16:34:55 +03:00
stdckdint.in.h Add some files and code rom Gnulib as preparation to TAR updates. 2024-10-05 15:07:13 +03:00
strutil.h doc: fix typos in comments 2024-10-05 18:55:01 +02:00
timefmt.c Update copyright years. 2024-01-01 09:46:17 +03:00
timefmt.h Fix various typos in the source code (closes MidnightCommander/mc#177). 2023-01-28 21:38:05 +03:00
unixcompat.h vfs: implement support for all known stat formats and centralize handling 2024-07-28 10:00:52 +02:00
util.c (size_trunc_len): fix Undefined Binary Operator Result. 2024-12-22 11:39:28 +03:00
util.h Ticket #4584: re-implement mocking via weak symbols instead of symbol duplication 2024-10-19 08:56:40 +02:00
utilunix.c (canonicalize_pathname_custom): fix --disable-charset build broken in 8f723b8 2024-10-26 18:22:53 +02:00
widget.h Create WBackground widget. 2020-03-08 20:17:29 +03:00