Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/sharutils-4.15.2/intl/printf.c Examining data/sharutils-4.15.2/intl/printf-args.h Examining data/sharutils-4.15.2/intl/finddomain.c Examining data/sharutils-4.15.2/intl/osdep.c Examining data/sharutils-4.15.2/intl/eval-plural.h Examining data/sharutils-4.15.2/intl/vasnwprintf.h Examining data/sharutils-4.15.2/intl/threadlib.c Examining data/sharutils-4.15.2/intl/printf-parse.h Examining data/sharutils-4.15.2/intl/log.c Examining data/sharutils-4.15.2/intl/os2compat.c Examining data/sharutils-4.15.2/intl/verify.h Examining data/sharutils-4.15.2/intl/gettext.c Examining data/sharutils-4.15.2/intl/textdomain.c Examining data/sharutils-4.15.2/intl/intl-compat.c Examining data/sharutils-4.15.2/intl/lock.c Examining data/sharutils-4.15.2/intl/loadmsgcat.c Examining data/sharutils-4.15.2/intl/dcngettext.c Examining data/sharutils-4.15.2/intl/setlocale.c Examining data/sharutils-4.15.2/intl/localcharset.c Examining data/sharutils-4.15.2/intl/relocatable.c Examining data/sharutils-4.15.2/intl/localcharset.h Examining data/sharutils-4.15.2/intl/hash-string.c Examining data/sharutils-4.15.2/intl/xsize.h Examining data/sharutils-4.15.2/intl/wprintf-parse.h Examining data/sharutils-4.15.2/intl/localealias.c Examining data/sharutils-4.15.2/intl/libgnuintl.in.h Examining data/sharutils-4.15.2/intl/tsearch.c Examining data/sharutils-4.15.2/intl/relocatable.h Examining data/sharutils-4.15.2/intl/ngettext.c Examining data/sharutils-4.15.2/intl/loadinfo.h Examining data/sharutils-4.15.2/intl/dcgettext.c Examining data/sharutils-4.15.2/intl/bindtextdom.c Examining data/sharutils-4.15.2/intl/xsize.c Examining data/sharutils-4.15.2/intl/plural.c Examining data/sharutils-4.15.2/intl/explodename.c Examining data/sharutils-4.15.2/intl/hash-string.h Examining data/sharutils-4.15.2/intl/lock.h Examining data/sharutils-4.15.2/intl/plural-exp.h Examining data/sharutils-4.15.2/intl/version.c Examining data/sharutils-4.15.2/intl/export.h Examining data/sharutils-4.15.2/intl/os2compat.h Examining data/sharutils-4.15.2/intl/vasnprintf.h Examining data/sharutils-4.15.2/intl/l10nflist.c Examining data/sharutils-4.15.2/intl/dcigettext.c Examining data/sharutils-4.15.2/intl/intl-exports.c Examining data/sharutils-4.15.2/intl/plural-exp.c Examining data/sharutils-4.15.2/intl/printf-args.c Examining data/sharutils-4.15.2/intl/gettextP.h Examining data/sharutils-4.15.2/intl/dgettext.c Examining data/sharutils-4.15.2/intl/langprefs.c Examining data/sharutils-4.15.2/intl/gmo.h Examining data/sharutils-4.15.2/intl/vasnprintf.c Examining data/sharutils-4.15.2/intl/localename.c Examining data/sharutils-4.15.2/intl/tsearch.h Examining data/sharutils-4.15.2/intl/printf-parse.c Examining data/sharutils-4.15.2/intl/dngettext.c Examining data/sharutils-4.15.2/libopts/cook.c Examining data/sharutils-4.15.2/libopts/ag-char-map.h Examining data/sharutils-4.15.2/libopts/stack.c Examining data/sharutils-4.15.2/libopts/autoopts.h Examining data/sharutils-4.15.2/libopts/ao-strs.c Examining data/sharutils-4.15.2/libopts/option-xat-attribute.c Examining data/sharutils-4.15.2/libopts/env.c Examining data/sharutils-4.15.2/libopts/numeric.c Examining data/sharutils-4.15.2/libopts/check.c Examining data/sharutils-4.15.2/libopts/text_mmap.c Examining data/sharutils-4.15.2/libopts/option-xat-attribute.h Examining data/sharutils-4.15.2/libopts/makeshell.c Examining data/sharutils-4.15.2/libopts/load.c Examining data/sharutils-4.15.2/libopts/libopts.c Examining data/sharutils-4.15.2/libopts/streqvcmp.c Examining data/sharutils-4.15.2/libopts/autoopts/project.h Examining data/sharutils-4.15.2/libopts/autoopts/options.h Examining data/sharutils-4.15.2/libopts/autoopts/usage-txt.h Examining data/sharutils-4.15.2/libopts/sort.c Examining data/sharutils-4.15.2/libopts/init.c Examining data/sharutils-4.15.2/libopts/proto.h Examining data/sharutils-4.15.2/libopts/enum.c Examining data/sharutils-4.15.2/libopts/configfile.c Examining data/sharutils-4.15.2/libopts/reset.c Examining data/sharutils-4.15.2/libopts/parse-duration.c Examining data/sharutils-4.15.2/libopts/stdnoreturn.in.h Examining data/sharutils-4.15.2/libopts/restore.c Examining data/sharutils-4.15.2/libopts/option-value-type.h Examining data/sharutils-4.15.2/libopts/version.c Examining data/sharutils-4.15.2/libopts/find.c Examining data/sharutils-4.15.2/libopts/alias.c Examining data/sharutils-4.15.2/libopts/autoopts.c Examining data/sharutils-4.15.2/libopts/nested.c Examining data/sharutils-4.15.2/libopts/genshell.c Examining data/sharutils-4.15.2/libopts/pgusage.c Examining data/sharutils-4.15.2/libopts/save.c Examining data/sharutils-4.15.2/libopts/putshell.c Examining data/sharutils-4.15.2/libopts/file.c Examining data/sharutils-4.15.2/libopts/usage.c Examining data/sharutils-4.15.2/libopts/gettext.h Examining data/sharutils-4.15.2/libopts/ao-strs.h Examining data/sharutils-4.15.2/libopts/intprops.h Examining data/sharutils-4.15.2/libopts/tokenize.c Examining data/sharutils-4.15.2/libopts/parse-duration.h Examining data/sharutils-4.15.2/libopts/option-value-type.c Examining data/sharutils-4.15.2/libopts/compat/strchr.c Examining data/sharutils-4.15.2/libopts/compat/compat.h Examining data/sharutils-4.15.2/libopts/compat/strdup.c Examining data/sharutils-4.15.2/libopts/compat/_Noreturn.h Examining data/sharutils-4.15.2/libopts/compat/windows-config.h Examining data/sharutils-4.15.2/libopts/compat/snprintf.c Examining data/sharutils-4.15.2/libopts/compat/pathfind.c Examining data/sharutils-4.15.2/libopts/genshell.h Examining data/sharutils-4.15.2/libopts/time.c Examining data/sharutils-4.15.2/libopts/boolean.c Examining data/sharutils-4.15.2/src/unshar-opts.c Examining data/sharutils-4.15.2/src/uudecode.c Examining data/sharutils-4.15.2/src/shar.c Examining data/sharutils-4.15.2/src/shar-opts.c Examining data/sharutils-4.15.2/src/encode.c Examining data/sharutils-4.15.2/src/scribble.c Examining data/sharutils-4.15.2/src/uuencode.c Examining data/sharutils-4.15.2/src/uuencode-opts.c Examining data/sharutils-4.15.2/src/scribble.h Examining data/sharutils-4.15.2/src/uudecode-opts.c Examining data/sharutils-4.15.2/src/local.h Examining data/sharutils-4.15.2/src/unshar.c Examining data/sharutils-4.15.2/src/shar-opts.h Examining data/sharutils-4.15.2/src/unshar-opts.h Examining data/sharutils-4.15.2/src/uudecode-opts.h Examining data/sharutils-4.15.2/src/uuencode-opts.h Examining data/sharutils-4.15.2/lib/md5.c Examining data/sharutils-4.15.2/lib/gl_openssl.h Examining data/sharutils-4.15.2/lib/msvc-nothrow.h Examining data/sharutils-4.15.2/lib/closedir.c Examining data/sharutils-4.15.2/lib/getopt.c Examining data/sharutils-4.15.2/lib/realloc.c Examining data/sharutils-4.15.2/lib/anytostr.c Examining data/sharutils-4.15.2/lib/xstrndup.h Examining data/sharutils-4.15.2/lib/c-strcase.h Examining data/sharutils-4.15.2/lib/msvc-inval.h Examining data/sharutils-4.15.2/lib/dosname.h Examining data/sharutils-4.15.2/lib/stdbool.in.h Examining data/sharutils-4.15.2/lib/idcache.c Examining data/sharutils-4.15.2/lib/tempname.h Examining data/sharutils-4.15.2/lib/binary-io.h Examining data/sharutils-4.15.2/lib/strftime.h Examining data/sharutils-4.15.2/lib/strchrnul.c Examining data/sharutils-4.15.2/lib/unistd-safer.h Examining data/sharutils-4.15.2/lib/chdir-long.c Examining data/sharutils-4.15.2/lib/w32spawn.h Examining data/sharutils-4.15.2/lib/at-func.c Examining data/sharutils-4.15.2/lib/unistd--.h Examining data/sharutils-4.15.2/lib/quotearg.h Examining data/sharutils-4.15.2/lib/verify.h Examining data/sharutils-4.15.2/lib/xalloc-oversized.h Examining data/sharutils-4.15.2/lib/rewinddir.c Examining data/sharutils-4.15.2/lib/basename-lgpl.c Examining data/sharutils-4.15.2/lib/dirname.c Examining data/sharutils-4.15.2/lib/dup2.c Examining data/sharutils-4.15.2/lib/alloca.c Examining data/sharutils-4.15.2/lib/fstat.c Examining data/sharutils-4.15.2/lib/cloexec.h Examining data/sharutils-4.15.2/lib/xstrndup.c Examining data/sharutils-4.15.2/lib/fd-hook.h Examining data/sharutils-4.15.2/lib/mbrtowc.c Examining data/sharutils-4.15.2/lib/binary-io.c Examining data/sharutils-4.15.2/lib/dirent-private.h Examining data/sharutils-4.15.2/lib/stdlib.in.h Examining data/sharutils-4.15.2/lib/tempname.c Examining data/sharutils-4.15.2/lib/fchdir.c Examining data/sharutils-4.15.2/lib/mbsinit.c Examining data/sharutils-4.15.2/lib/filenamecat.h Examining data/sharutils-4.15.2/lib/wctype-h.c Examining data/sharutils-4.15.2/lib/spawnattr_setsigmask.c Examining data/sharutils-4.15.2/lib/spawnattr_setflags.c Examining data/sharutils-4.15.2/lib/mkstemp.c Examining data/sharutils-4.15.2/lib/pipe-safer.c Examining data/sharutils-4.15.2/lib/error.h Examining data/sharutils-4.15.2/lib/localcharset.c Examining data/sharutils-4.15.2/lib/fdopendir.c Examining data/sharutils-4.15.2/lib/uinttostr.c Examining data/sharutils-4.15.2/lib/unistd.in.h Examining data/sharutils-4.15.2/lib/sys_wait.in.h Examining data/sharutils-4.15.2/lib/stat.c Examining data/sharutils-4.15.2/lib/localcharset.h Examining data/sharutils-4.15.2/lib/sig-handler.h Examining data/sharutils-4.15.2/lib/base64.h Examining data/sharutils-4.15.2/lib/getopt.in.h Examining data/sharutils-4.15.2/lib/memrchr.c Examining data/sharutils-4.15.2/lib/popen.c Examining data/sharutils-4.15.2/lib/time_r.c Examining data/sharutils-4.15.2/lib/pipe.h Examining data/sharutils-4.15.2/lib/dup.c Examining data/sharutils-4.15.2/lib/spawn_faction_init.c Examining data/sharutils-4.15.2/lib/strnlen.c Examining data/sharutils-4.15.2/lib/exitfail.h Examining data/sharutils-4.15.2/lib/lseek.c Examining data/sharutils-4.15.2/lib/strerror.c Examining data/sharutils-4.15.2/lib/spawn-pipe.c Examining data/sharutils-4.15.2/lib/fd-safer-flag.c Examining data/sharutils-4.15.2/lib/offtostr.c Examining data/sharutils-4.15.2/lib/inttypes.in.h Examining data/sharutils-4.15.2/lib/raise.c Examining data/sharutils-4.15.2/lib/basename.c Examining data/sharutils-4.15.2/lib/gettimeofday.c Examining data/sharutils-4.15.2/lib/secure_getenv.c Examining data/sharutils-4.15.2/lib/assure.h Examining data/sharutils-4.15.2/lib/rawmemchr.c Examining data/sharutils-4.15.2/lib/stripslash.c Examining data/sharutils-4.15.2/lib/getdtablesize.c Examining data/sharutils-4.15.2/lib/sys_utsname.in.h Examining data/sharutils-4.15.2/lib/w32sock.h Examining data/sharutils-4.15.2/lib/mktime-internal.h Examining data/sharutils-4.15.2/lib/xalloc.h Examining data/sharutils-4.15.2/lib/getopt1.c Examining data/sharutils-4.15.2/lib/msvc-inval.c Examining data/sharutils-4.15.2/lib/spawn_faction_adddup2.c Examining data/sharutils-4.15.2/lib/strtoll.c Examining data/sharutils-4.15.2/lib/sig-handler.c Examining data/sharutils-4.15.2/lib/stdnoreturn.in.h Examining data/sharutils-4.15.2/lib/lstat.c Examining data/sharutils-4.15.2/lib/strerror-override.h Examining data/sharutils-4.15.2/lib/mempcpy.c Examining data/sharutils-4.15.2/lib/fd-safer.c Examining data/sharutils-4.15.2/lib/xmalloc.c Examining data/sharutils-4.15.2/lib/md5.h Examining data/sharutils-4.15.2/lib/chdir-long.h Examining data/sharutils-4.15.2/lib/signal.in.h Examining data/sharutils-4.15.2/lib/idcache.h Examining data/sharutils-4.15.2/lib/spawn_int.h Examining data/sharutils-4.15.2/lib/dirfd.c Examining data/sharutils-4.15.2/lib/sigprocmask.c Examining data/sharutils-4.15.2/lib/fcntl.in.h Examining data/sharutils-4.15.2/lib/getcwd-lgpl.c Examining data/sharutils-4.15.2/lib/spawn_faction_addclose.c Examining data/sharutils-4.15.2/lib/spawnp.c Examining data/sharutils-4.15.2/lib/memchr.c Examining data/sharutils-4.15.2/lib/fstatat.c Examining data/sharutils-4.15.2/lib/sys_time.in.h Examining data/sharutils-4.15.2/lib/c-strcaseeq.h Examining data/sharutils-4.15.2/lib/filename.h Examining data/sharutils-4.15.2/lib/base64.c Examining data/sharutils-4.15.2/lib/fd-hook.c Examining data/sharutils-4.15.2/lib/strftime.c Examining data/sharutils-4.15.2/lib/sockets.h Examining data/sharutils-4.15.2/lib/error.c Examining data/sharutils-4.15.2/lib/pathmax.h Examining data/sharutils-4.15.2/lib/inttostr.h Examining data/sharutils-4.15.2/lib/unlocked-io.h Examining data/sharutils-4.15.2/lib/getopt_int.h Examining data/sharutils-4.15.2/lib/save-cwd.c Examining data/sharutils-4.15.2/lib/openat-priv.h Examining data/sharutils-4.15.2/lib/wctype.in.h Examining data/sharutils-4.15.2/lib/dirname.h Examining data/sharutils-4.15.2/lib/spawn-pipe.h Examining data/sharutils-4.15.2/lib/sockets.c Examining data/sharutils-4.15.2/lib/pipe2.c Examining data/sharutils-4.15.2/lib/getcwd.c Examining data/sharutils-4.15.2/lib/unistd.c Examining data/sharutils-4.15.2/lib/xstrtol-error.c Examining data/sharutils-4.15.2/lib/strerror-override.c Examining data/sharutils-4.15.2/lib/openat.h Examining data/sharutils-4.15.2/lib/c-strncasecmp.c Examining data/sharutils-4.15.2/lib/quote.h Examining data/sharutils-4.15.2/lib/umaxtostr.c Examining data/sharutils-4.15.2/lib/wait-process.c Examining data/sharutils-4.15.2/lib/c-ctype.c Examining data/sharutils-4.15.2/lib/stpcpy.c Examining data/sharutils-4.15.2/lib/sys_uio.in.h Examining data/sharutils-4.15.2/lib/c-ctype.h Examining data/sharutils-4.15.2/lib/alloca.in.h Examining data/sharutils-4.15.2/lib/wait-process.h Examining data/sharutils-4.15.2/lib/strdup.c Examining data/sharutils-4.15.2/lib/strtol.c Examining data/sharutils-4.15.2/lib/cloexec.c Examining data/sharutils-4.15.2/lib/ftello.c Examining data/sharutils-4.15.2/lib/fatal-signal.h Examining data/sharutils-4.15.2/lib/fatal-signal.c Examining data/sharutils-4.15.2/lib/stdio.in.h Examining data/sharutils-4.15.2/lib/filenamecat-lgpl.c Examining data/sharutils-4.15.2/lib/stddef.in.h Examining data/sharutils-4.15.2/lib/close.c Examining data/sharutils-4.15.2/lib/xalloc-die.c Examining data/sharutils-4.15.2/lib/strtoimax.c Examining data/sharutils-4.15.2/lib/pipe2-safer.c Examining data/sharutils-4.15.2/lib/gethostname.c Examining data/sharutils-4.15.2/lib/mktime.c Examining data/sharutils-4.15.2/lib/openat-die.c Examining data/sharutils-4.15.2/lib/freading.h Examining data/sharutils-4.15.2/lib/sys_stat.in.h Examining data/sharutils-4.15.2/lib/ftell.c Examining data/sharutils-4.15.2/lib/imaxtostr.c Examining data/sharutils-4.15.2/lib/fseek.c Examining data/sharutils-4.15.2/lib/opendir.c Examining data/sharutils-4.15.2/lib/system.h Examining data/sharutils-4.15.2/lib/gettext.h Examining data/sharutils-4.15.2/lib/time.in.h Examining data/sharutils-4.15.2/lib/streq.h Examining data/sharutils-4.15.2/lib/sys_types.in.h Examining data/sharutils-4.15.2/lib/errno.in.h Examining data/sharutils-4.15.2/lib/xgetcwd.h Examining data/sharutils-4.15.2/lib/stdint.in.h Examining data/sharutils-4.15.2/lib/intprops.h Examining data/sharutils-4.15.2/lib/spawnattr_destroy.c Examining data/sharutils-4.15.2/lib/inttostr.c Examining data/sharutils-4.15.2/lib/sys_socket.in.h Examining data/sharutils-4.15.2/lib/xstrtol.c Examining data/sharutils-4.15.2/lib/stdalign.in.h Examining data/sharutils-4.15.2/lib/openat.c Examining data/sharutils-4.15.2/lib/msvc-nothrow.c Examining data/sharutils-4.15.2/lib/malloc.c Examining data/sharutils-4.15.2/lib/spawn.in.h Examining data/sharutils-4.15.2/lib/xstrtoul.c Examining data/sharutils-4.15.2/lib/c-strcasecmp.c Examining data/sharutils-4.15.2/lib/open.c Examining data/sharutils-4.15.2/lib/strndup.c Examining data/sharutils-4.15.2/lib/exitfail.c Examining data/sharutils-4.15.2/lib/xstrtoimax.c Examining data/sharutils-4.15.2/lib/string.in.h Examining data/sharutils-4.15.2/lib/dup-safer-flag.c Examining data/sharutils-4.15.2/lib/xgetcwd.c Examining data/sharutils-4.15.2/lib/wchar.in.h Examining data/sharutils-4.15.2/lib/sched.in.h Examining data/sharutils-4.15.2/lib/waitpid.c Examining data/sharutils-4.15.2/lib/quotearg.c Examining data/sharutils-4.15.2/lib/readdir.c Examining data/sharutils-4.15.2/lib/spawn_faction_destroy.c Examining data/sharutils-4.15.2/lib/freopen.c Examining data/sharutils-4.15.2/lib/save-cwd.h Examining data/sharutils-4.15.2/lib/openat-proc.c Examining data/sharutils-4.15.2/lib/sigaction.c Examining data/sharutils-4.15.2/lib/xstrtol.h Examining data/sharutils-4.15.2/lib/spawni.c Examining data/sharutils-4.15.2/lib/spawn_faction_addopen.c Examining data/sharutils-4.15.2/lib/spawnattr_init.c Examining data/sharutils-4.15.2/lib/dirname-lgpl.c Examining data/sharutils-4.15.2/lib/dirent.in.h Examining data/sharutils-4.15.2/lib/sys_socket.c Examining data/sharutils-4.15.2/lib/uname.c Examining data/sharutils-4.15.2/lib/dup-safer.c Examining data/sharutils-4.15.2/lib/ctype.in.h Examining data/sharutils-4.15.2/lib/liballoca.h Examining data/sharutils-4.15.2/lib/fcntl.c Examining data/sharutils-4.15.2/lib/fflush.c Examining data/sharutils-4.15.2/lib/fpurge.c Examining data/sharutils-4.15.2/lib/freading.c Examining data/sharutils-4.15.2/lib/fseeko.c Examining data/sharutils-4.15.2/lib/stdio-impl.h Examining data/sharutils-4.15.2/snippet/warn-on-use.h Examining data/sharutils-4.15.2/snippet/unused-parameter.h Examining data/sharutils-4.15.2/snippet/c++defs.h Examining data/sharutils-4.15.2/snippet/_Noreturn.h Examining data/sharutils-4.15.2/snippet/arg-nonnull.h FINAL RESULTS: data/sharutils-4.15.2/lib/stdio.in.h:725:8: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. #undef gets data/sharutils-4.15.2/lib/stdio.in.h:727:18: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); data/sharutils-4.15.2/lib/sys_stat.in.h:432:19: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. # define lchmod chmod data/sharutils-4.15.2/lib/sys_stat.in.h:436:34: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. _GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int, data/sharutils-4.15.2/lib/unistd.in.h:260:18: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - " data/sharutils-4.15.2/lib/unistd.in.h:274:11: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. # undef chown data/sharutils-4.15.2/lib/unistd.in.h:275:12: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. # define chown rpl_chown data/sharutils-4.15.2/lib/unistd.in.h:277:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid) data/sharutils-4.15.2/lib/unistd.in.h:279:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)); data/sharutils-4.15.2/lib/unistd.in.h:282:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid) data/sharutils-4.15.2/lib/unistd.in.h:285:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)); data/sharutils-4.15.2/lib/unistd.in.h:287:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_CXXALIASWARN (chown); data/sharutils-4.15.2/lib/unistd.in.h:289:9: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. # undef chown data/sharutils-4.15.2/lib/unistd.in.h:291:18: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " data/sharutils-4.15.2/lib/unistd.in.h:1269:12: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. # define readlink rpl_readlink data/sharutils-4.15.2/lib/unistd.in.h:1271:19: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. _GL_FUNCDECL_RPL (readlink, ssize_t, data/sharutils-4.15.2/lib/unistd.in.h:1274:19: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. _GL_CXXALIAS_RPL (readlink, ssize_t, data/sharutils-4.15.2/lib/unistd.in.h:1278:19: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. _GL_FUNCDECL_SYS (readlink, ssize_t, data/sharutils-4.15.2/lib/unistd.in.h:1282:19: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. _GL_CXXALIAS_SYS (readlink, ssize_t, data/sharutils-4.15.2/lib/unistd.in.h:1285:19: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. _GL_CXXALIASWARN (readlink); data/sharutils-4.15.2/lib/unistd.in.h:1287:9: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. # undef readlink data/sharutils-4.15.2/lib/unistd.in.h:1289:18: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. _GL_WARN_ON_USE (readlink, "readlink is unportable - " data/sharutils-4.15.2/src/uudecode.c:82:33: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. #define UU_CHMOD(_n, _fd, _m) chmod ((_n), UU_MODE_BITS(_m)) data/sharutils-4.15.2/intl/dcigettext.c:797:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (new_localename, localename); data/sharutils-4.15.2/intl/langprefs.c:297:29: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (p, buf); data/sharutils-4.15.2/intl/libgnuintl.in.h:326:15: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */ data/sharutils-4.15.2/intl/libgnuintl.in.h:327:8: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef fprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:328:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define fprintf libintl_fprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:329:12: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int fprintf (FILE *, const char *, ...); data/sharutils-4.15.2/intl/libgnuintl.in.h:331:15: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */ data/sharutils-4.15.2/intl/libgnuintl.in.h:332:8: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef vfprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:333:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define vfprintf libintl_vfprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:334:12: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int vfprintf (FILE *, const char *, va_list); data/sharutils-4.15.2/intl/libgnuintl.in.h:337:15: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */ data/sharutils-4.15.2/intl/libgnuintl.in.h:338:8: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef printf data/sharutils-4.15.2/intl/libgnuintl.in.h:351:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define printf libintl_printf data/sharutils-4.15.2/intl/libgnuintl.in.h:352:12: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int printf (const char *, ...); data/sharutils-4.15.2/intl/libgnuintl.in.h:354:15: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */ data/sharutils-4.15.2/intl/libgnuintl.in.h:355:8: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef vprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:356:9: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define vprintf libintl_vprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:357:12: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int vprintf (const char *, va_list); data/sharutils-4.15.2/intl/libgnuintl.in.h:360:15: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */ data/sharutils-4.15.2/intl/libgnuintl.in.h:361:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #undef sprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:362:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #define sprintf libintl_sprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:363:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. extern int sprintf (char *, const char *, ...); data/sharutils-4.15.2/intl/libgnuintl.in.h:365:15: [4] (buffer) vsprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */ data/sharutils-4.15.2/intl/libgnuintl.in.h:366:8: [4] (buffer) vsprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #undef vsprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:367:9: [4] (buffer) vsprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #define vsprintf libintl_vsprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:368:12: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. extern int vsprintf (char *, const char *, va_list); data/sharutils-4.15.2/intl/libgnuintl.in.h:373:15: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */ data/sharutils-4.15.2/intl/libgnuintl.in.h:374:8: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #undef snprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:375:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf libintl_snprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:376:12: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. extern int snprintf (char *, size_t, const char *, ...); data/sharutils-4.15.2/intl/libgnuintl.in.h:378:15: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */ data/sharutils-4.15.2/intl/libgnuintl.in.h:379:8: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #undef vsnprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:380:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define vsnprintf libintl_vsnprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:381:12: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. extern int vsnprintf (char *, size_t, const char *, va_list); data/sharutils-4.15.2/intl/libgnuintl.in.h:403:8: [4] (format) fwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef fwprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:404:9: [4] (format) fwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define fwprintf libintl_fwprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:405:12: [4] (format) fwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int fwprintf (FILE *, const wchar_t *, ...); data/sharutils-4.15.2/intl/libgnuintl.in.h:406:8: [4] (format) vfwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef vfwprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:407:9: [4] (format) vfwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define vfwprintf libintl_vfwprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:408:12: [4] (format) vfwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int vfwprintf (FILE *, const wchar_t *, va_list); data/sharutils-4.15.2/intl/libgnuintl.in.h:410:8: [4] (format) wprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef wprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:411:9: [4] (format) wprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define wprintf libintl_wprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:412:12: [4] (format) wprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int wprintf (const wchar_t *, ...); data/sharutils-4.15.2/intl/libgnuintl.in.h:413:8: [4] (format) vwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef vwprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:414:9: [4] (format) vwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define vwprintf libintl_vwprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:415:12: [4] (format) vwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int vwprintf (const wchar_t *, va_list); data/sharutils-4.15.2/intl/libgnuintl.in.h:417:8: [4] (buffer) swprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #undef swprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:418:9: [4] (buffer) swprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #define swprintf libintl_swprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:419:12: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. extern int swprintf (wchar_t *, size_t, const wchar_t *, ...); data/sharutils-4.15.2/intl/libgnuintl.in.h:420:8: [4] (buffer) vswprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #undef vswprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:421:9: [4] (buffer) vswprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #define vswprintf libintl_vswprintf data/sharutils-4.15.2/intl/libgnuintl.in.h:422:12: [4] (format) vswprintf: Potential format string problem (CWE-134). Make format string constant. extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); data/sharutils-4.15.2/intl/localcharset.c:239:23: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); data/sharutils-4.15.2/intl/localcharset.c:240:23: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (res_ptr + res_size - (l2 + 1), buf2); data/sharutils-4.15.2/intl/localcharset.c:481:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "CP%s", pdot + 1); data/sharutils-4.15.2/intl/localename.c:1354:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (name, legacy_table[i1].unixy); data/sharutils-4.15.2/intl/localename.c:1378:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (name, langtag_table[i1].unixy); data/sharutils-4.15.2/intl/localename.c:1398:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (name + 3, script_table[i1].unixy); data/sharutils-4.15.2/intl/localename.c:2577:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (last_locale, locale_name); data/sharutils-4.15.2/intl/log.c:88:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (last_logfilename, logfilename); data/sharutils-4.15.2/intl/os2compat.c:95:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (libintl_nl_default_dirname, _nlos2_localedir); data/sharutils-4.15.2/intl/plural.c:756:21: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define YYFPRINTF fprintf data/sharutils-4.15.2/intl/printf.c:98:12: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. return vfprintf (stream, format, args); data/sharutils-4.15.2/intl/printf.c:158:12: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. return vsprintf (resultbuf, format, args); data/sharutils-4.15.2/intl/printf.c:197:29: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define system_vsnprintf vsnprintf data/sharutils-4.15.2/intl/printf.c:203:28: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define system_vsnprintf vsnprintf data/sharutils-4.15.2/intl/printf.c:317:28: [4] (buffer) vswprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. # define system_vswprintf vswprintf data/sharutils-4.15.2/intl/printf.c:325:12: [4] (format) vfwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. return vfwprintf (stream, format, args); data/sharutils-4.15.2/intl/relocatable.c:471:15: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (result, curr_prefix); data/sharutils-4.15.2/intl/relocatable.c:487:15: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (result + curr_prefix_len, pathname_tail); data/sharutils-4.15.2/intl/setlocale.c:712:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (ll_buf + (underscore - llCC_buf), territory_end); data/sharutils-4.15.2/intl/vasnprintf.c:162:20: [4] (buffer) swprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. # define SNPRINTF swprintf data/sharutils-4.15.2/intl/vasnprintf.c:180:21: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define SNPRINTF snprintf data/sharutils-4.15.2/intl/vasnprintf.c:182:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # undef snprintf data/sharutils-4.15.2/intl/vasnprintf.c:184:21: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define SNPRINTF _snprintf data/sharutils-4.15.2/intl/vasnprintf.c:188:20: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define SNPRINTF snprintf data/sharutils-4.15.2/intl/vasnprintf.c:190:10: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # undef snprintf data/sharutils-4.15.2/intl/vasnprintf.c:194:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #undef sprintf data/sharutils-4.15.2/intl/vasnprintf.c:4256:39: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf ((char *) p, decimal_format, exponent); data/sharutils-4.15.2/intl/vasnprintf.c:4264:39: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (expbuf, decimal_format, exponent); data/sharutils-4.15.2/intl/vasnprintf.c:4449:47: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf ((char *) p, decimal_format, exponent); data/sharutils-4.15.2/intl/vasnprintf.c:4457:47: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (expbuf, decimal_format, exponent); data/sharutils-4.15.2/intl/vasnprintf.c:4969:33: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. count = sprintf (tmp, buf, arg); \ data/sharutils-4.15.2/intl/vasnprintf.c:4972:33: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. count = sprintf (tmp, buf, prefixes[0], arg); \ data/sharutils-4.15.2/intl/vasnprintf.c:4975:33: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ data/sharutils-4.15.2/intl/vasnprintf.h:35:22: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define __printf__ printf data/sharutils-4.15.2/lib/chdir-long.c:252:7: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp (cmd, (char *) NULL); data/sharutils-4.15.2/lib/error.c:270:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf (stderr, message, args); data/sharutils-4.15.2/lib/error.c:385:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, file_name != NULL ? "%s:%d: " : " ", data/sharutils-4.15.2/lib/idcache.c:88:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (match->name, name); data/sharutils-4.15.2/lib/idcache.c:131:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (tail->name, user); data/sharutils-4.15.2/lib/idcache.c:170:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (match->name, name); data/sharutils-4.15.2/lib/idcache.c:213:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (tail->name, group); data/sharutils-4.15.2/lib/localcharset.c:239:23: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); data/sharutils-4.15.2/lib/localcharset.c:240:23: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (res_ptr + res_size - (l2 + 1), buf2); data/sharutils-4.15.2/lib/localcharset.c:511:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "CP%s", pdot + 1); data/sharutils-4.15.2/lib/openat-proc.c:81:11: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (dotdot_buf, PROC_SELF_FD_FORMAT, proc_self_fd, "../fd"); data/sharutils-4.15.2/lib/openat-proc.c:82:25: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. proc_status = access (dotdot_buf, F_OK) ? -1 : 1; data/sharutils-4.15.2/lib/openat-proc.c:99:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (result, PROC_SELF_FD_FORMAT, fd, file); data/sharutils-4.15.2/lib/opendir.c:130:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (dirp->dir_name_mask, dir_name_mask); data/sharutils-4.15.2/lib/popen.c:30:1: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. popen (const char *filename, const char *mode) data/sharutils-4.15.2/lib/popen.c:48:9: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # undef popen data/sharutils-4.15.2/lib/popen.c:92:12: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. result = popen (filename, mode); data/sharutils-4.15.2/lib/stat.c:117:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (fixed_name, name); data/sharutils-4.15.2/lib/stdio.in.h:284:12: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define fprintf rpl_fprintf data/sharutils-4.15.2/lib/stdio.in.h:288:19: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) data/sharutils-4.15.2/lib/stdio.in.h:292:19: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) data/sharutils-4.15.2/lib/stdio.in.h:296:19: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...)); data/sharutils-4.15.2/lib/stdio.in.h:298:19: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...)); data/sharutils-4.15.2/lib/stdio.in.h:300:19: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_CXXALIASWARN (fprintf); data/sharutils-4.15.2/lib/stdio.in.h:304:10: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # undef fprintf data/sharutils-4.15.2/lib/stdio.in.h:307:18: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " data/sharutils-4.15.2/lib/stdio.in.h:411:11: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # undef fscanf data/sharutils-4.15.2/lib/stdio.in.h:412:12: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # define fscanf rpl_fscanf data/sharutils-4.15.2/lib/stdio.in.h:414:19: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_FUNCDECL_RPL (fscanf, int, (FILE *stream, const char *format, ...) data/sharutils-4.15.2/lib/stdio.in.h:417:19: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_CXXALIAS_RPL (fscanf, int, (FILE *stream, const char *format, ...)); data/sharutils-4.15.2/lib/stdio.in.h:419:19: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_CXXALIAS_SYS (fscanf, int, (FILE *stream, const char *format, ...)); data/sharutils-4.15.2/lib/stdio.in.h:421:19: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_CXXALIASWARN (fscanf); data/sharutils-4.15.2/lib/stdio.in.h:820:11: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # undef popen data/sharutils-4.15.2/lib/stdio.in.h:821:12: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # define popen rpl_popen data/sharutils-4.15.2/lib/stdio.in.h:823:19: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. _GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) data/sharutils-4.15.2/lib/stdio.in.h:825:19: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); data/sharutils-4.15.2/lib/stdio.in.h:828:19: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. _GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) data/sharutils-4.15.2/lib/stdio.in.h:831:19: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); data/sharutils-4.15.2/lib/stdio.in.h:833:19: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. _GL_CXXALIASWARN (popen); data/sharutils-4.15.2/lib/stdio.in.h:835:9: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # undef popen data/sharutils-4.15.2/lib/stdio.in.h:837:18: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " data/sharutils-4.15.2/lib/stdio.in.h:848:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define printf __printf__ data/sharutils-4.15.2/lib/stdio.in.h:865:21: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); data/sharutils-4.15.2/lib/stdio.in.h:868:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define printf rpl_printf data/sharutils-4.15.2/lib/stdio.in.h:870:19: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_FUNCDECL_RPL (printf, int, data/sharutils-4.15.2/lib/stdio.in.h:874:19: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_CXXALIAS_RPL (printf, int, (const char *format, ...)); data/sharutils-4.15.2/lib/stdio.in.h:878:19: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_CXXALIAS_SYS (printf, int, (const char *format, ...)); data/sharutils-4.15.2/lib/stdio.in.h:880:19: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_CXXALIASWARN (printf); data/sharutils-4.15.2/lib/stdio.in.h:884:10: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # undef printf data/sharutils-4.15.2/lib/stdio.in.h:887:18: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " data/sharutils-4.15.2/lib/stdio.in.h:1009:12: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # undef scanf data/sharutils-4.15.2/lib/stdio.in.h:1011:13: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # define scanf __scanf__ data/sharutils-4.15.2/lib/stdio.in.h:1019:21: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *format, ...)); data/sharutils-4.15.2/lib/stdio.in.h:1022:12: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # undef scanf data/sharutils-4.15.2/lib/stdio.in.h:1023:13: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # define scanf rpl_scanf data/sharutils-4.15.2/lib/stdio.in.h:1025:19: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_FUNCDECL_RPL (scanf, int, (const char *format, ...) data/sharutils-4.15.2/lib/stdio.in.h:1028:19: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_CXXALIAS_RPL (scanf, int, (const char *format, ...)); data/sharutils-4.15.2/lib/stdio.in.h:1031:19: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_CXXALIAS_SYS (scanf, int, (const char *format, ...)); data/sharutils-4.15.2/lib/stdio.in.h:1033:19: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_CXXALIASWARN (scanf); data/sharutils-4.15.2/lib/stdio.in.h:1039:12: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf rpl_snprintf data/sharutils-4.15.2/lib/stdio.in.h:1041:19: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. _GL_FUNCDECL_RPL (snprintf, int, data/sharutils-4.15.2/lib/stdio.in.h:1045:19: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. _GL_CXXALIAS_RPL (snprintf, int, data/sharutils-4.15.2/lib/stdio.in.h:1049:19: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. _GL_FUNCDECL_SYS (snprintf, int, data/sharutils-4.15.2/lib/stdio.in.h:1054:19: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. _GL_CXXALIAS_SYS (snprintf, int, data/sharutils-4.15.2/lib/stdio.in.h:1057:19: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. _GL_CXXALIASWARN (snprintf); data/sharutils-4.15.2/lib/stdio.in.h:1059:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # undef snprintf data/sharutils-4.15.2/lib/stdio.in.h:1061:18: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " data/sharutils-4.15.2/lib/stdio.in.h:1078:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. # define sprintf rpl_sprintf data/sharutils-4.15.2/lib/stdio.in.h:1080:19: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. _GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...) data/sharutils-4.15.2/lib/stdio.in.h:1083:19: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. _GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...)); data/sharutils-4.15.2/lib/stdio.in.h:1085:19: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. _GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...)); data/sharutils-4.15.2/lib/stdio.in.h:1087:19: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. _GL_CXXALIASWARN (sprintf); data/sharutils-4.15.2/lib/stdio.in.h:1089:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. # undef sprintf data/sharutils-4.15.2/lib/stdio.in.h:1091:18: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " data/sharutils-4.15.2/lib/stdio.in.h:1197:12: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define vfprintf rpl_vfprintf data/sharutils-4.15.2/lib/stdio.in.h:1201:19: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) data/sharutils-4.15.2/lib/stdio.in.h:1205:19: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) data/sharutils-4.15.2/lib/stdio.in.h:1209:19: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)); data/sharutils-4.15.2/lib/stdio.in.h:1214:24: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_CXXALIAS_SYS_CAST (vfprintf, int, data/sharutils-4.15.2/lib/stdio.in.h:1217:19: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_CXXALIASWARN (vfprintf); data/sharutils-4.15.2/lib/stdio.in.h:1221:10: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # undef vfprintf data/sharutils-4.15.2/lib/stdio.in.h:1224:18: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " data/sharutils-4.15.2/lib/stdio.in.h:1232:11: [4] (buffer) vfscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # undef vfscanf data/sharutils-4.15.2/lib/stdio.in.h:1233:12: [4] (buffer) vfscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # define vfscanf rpl_vfscanf data/sharutils-4.15.2/lib/stdio.in.h:1235:19: [4] (buffer) vfscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_FUNCDECL_RPL (vfscanf, int, data/sharutils-4.15.2/lib/stdio.in.h:1239:19: [4] (buffer) vfscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_CXXALIAS_RPL (vfscanf, int, data/sharutils-4.15.2/lib/stdio.in.h:1242:19: [4] (buffer) vfscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_CXXALIAS_SYS (vfscanf, int, data/sharutils-4.15.2/lib/stdio.in.h:1245:19: [4] (buffer) vfscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_CXXALIASWARN (vfscanf); data/sharutils-4.15.2/lib/stdio.in.h:1252:12: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define vprintf rpl_vprintf data/sharutils-4.15.2/lib/stdio.in.h:1256:19: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) data/sharutils-4.15.2/lib/stdio.in.h:1260:19: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) data/sharutils-4.15.2/lib/stdio.in.h:1264:19: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args)); data/sharutils-4.15.2/lib/stdio.in.h:1269:24: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args)); data/sharutils-4.15.2/lib/stdio.in.h:1271:19: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_CXXALIASWARN (vprintf); data/sharutils-4.15.2/lib/stdio.in.h:1275:10: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # undef vprintf data/sharutils-4.15.2/lib/stdio.in.h:1278:18: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " data/sharutils-4.15.2/lib/stdio.in.h:1286:11: [4] (buffer) vscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # undef vscanf data/sharutils-4.15.2/lib/stdio.in.h:1287:12: [4] (buffer) vscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. # define vscanf rpl_vscanf data/sharutils-4.15.2/lib/stdio.in.h:1289:19: [4] (buffer) vscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_FUNCDECL_RPL (vscanf, int, (const char *format, va_list args) data/sharutils-4.15.2/lib/stdio.in.h:1292:19: [4] (buffer) vscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_CXXALIAS_RPL (vscanf, int, (const char *format, va_list args)); data/sharutils-4.15.2/lib/stdio.in.h:1294:19: [4] (buffer) vscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_CXXALIAS_SYS (vscanf, int, (const char *format, va_list args)); data/sharutils-4.15.2/lib/stdio.in.h:1296:19: [4] (buffer) vscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. _GL_CXXALIASWARN (vscanf); data/sharutils-4.15.2/lib/stdio.in.h:1302:12: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define vsnprintf rpl_vsnprintf data/sharutils-4.15.2/lib/stdio.in.h:1304:19: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. _GL_FUNCDECL_RPL (vsnprintf, int, data/sharutils-4.15.2/lib/stdio.in.h:1308:19: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. _GL_CXXALIAS_RPL (vsnprintf, int, data/sharutils-4.15.2/lib/stdio.in.h:1312:19: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. _GL_FUNCDECL_SYS (vsnprintf, int, data/sharutils-4.15.2/lib/stdio.in.h:1317:19: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. _GL_CXXALIAS_SYS (vsnprintf, int, data/sharutils-4.15.2/lib/stdio.in.h:1320:19: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. _GL_CXXALIASWARN (vsnprintf); data/sharutils-4.15.2/lib/stdio.in.h:1322:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # undef vsnprintf data/sharutils-4.15.2/lib/stdio.in.h:1324:18: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " data/sharutils-4.15.2/lib/stdio.in.h:1332:12: [4] (buffer) vsprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. # define vsprintf rpl_vsprintf data/sharutils-4.15.2/lib/stdio.in.h:1334:19: [4] (buffer) vsprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. _GL_FUNCDECL_RPL (vsprintf, int, data/sharutils-4.15.2/lib/stdio.in.h:1338:19: [4] (buffer) vsprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. _GL_CXXALIAS_RPL (vsprintf, int, data/sharutils-4.15.2/lib/stdio.in.h:1344:24: [4] (buffer) vsprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. _GL_CXXALIAS_SYS_CAST (vsprintf, int, data/sharutils-4.15.2/lib/stdio.in.h:1347:19: [4] (buffer) vsprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. _GL_CXXALIASWARN (vsprintf); data/sharutils-4.15.2/lib/stdio.in.h:1349:9: [4] (buffer) vsprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. # undef vsprintf data/sharutils-4.15.2/lib/stdio.in.h:1351:18: [4] (buffer) vsprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " data/sharutils-4.15.2/lib/strerror.c:33:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #undef sprintf data/sharutils-4.15.2/lib/strerror.c:59:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buf, fmt, n); data/sharutils-4.15.2/lib/system.h:79:7: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. FILE *popen (); data/sharutils-4.15.2/lib/uname.c:117:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf->sysname, "MINGW32_%s-%u.%u", super_version, data/sharutils-4.15.2/lib/uname.c:121:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf->sysname, "Windows%s", super_version); data/sharutils-4.15.2/lib/uname.c:173:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf->release, "%s %u.%u", data/sharutils-4.15.2/lib/uname.c:178:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (buf->release, base); data/sharutils-4.15.2/lib/uname.c:190:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf->release, "Windows %s", super_version); data/sharutils-4.15.2/lib/uname.c:192:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (buf->version, version.szCSDVersion); data/sharutils-4.15.2/lib/unistd.in.h:249:18: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. _GL_WARN_ON_USE (access, "the access function is a security risk - " data/sharutils-4.15.2/lib/unistd.in.h:780:19: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. _GL_FUNCDECL_SYS (getlogin, char *, (void)); data/sharutils-4.15.2/lib/unistd.in.h:782:19: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. _GL_CXXALIAS_SYS (getlogin, char *, (void)); data/sharutils-4.15.2/lib/unistd.in.h:783:19: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. _GL_CXXALIASWARN (getlogin); data/sharutils-4.15.2/lib/unistd.in.h:785:9: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. # undef getlogin data/sharutils-4.15.2/lib/unistd.in.h:787:18: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. _GL_WARN_ON_USE (getlogin, "getlogin is unportable - " data/sharutils-4.15.2/lib/wchar.in.h:595:19: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. _GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); data/sharutils-4.15.2/lib/wchar.in.h:597:19: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. _GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); data/sharutils-4.15.2/lib/wchar.in.h:598:19: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. _GL_CXXALIASWARN (wcscpy); data/sharutils-4.15.2/lib/wchar.in.h:600:9: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. # undef wcscpy data/sharutils-4.15.2/lib/wchar.in.h:602:18: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " data/sharutils-4.15.2/lib/wchar.in.h:664:19: [4] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). _GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src)); data/sharutils-4.15.2/lib/wchar.in.h:666:19: [4] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). _GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src)); data/sharutils-4.15.2/lib/wchar.in.h:667:19: [4] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). _GL_CXXALIASWARN (wcscat); data/sharutils-4.15.2/lib/wchar.in.h:669:9: [4] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). # undef wcscat data/sharutils-4.15.2/lib/wchar.in.h:671:18: [4] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). _GL_WARN_ON_USE (wcscat, "wcscat is unportable - " data/sharutils-4.15.2/libopts/alias.c:40:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, ztoo_often_fmt, opts->pzProgName); data/sharutils-4.15.2/libopts/alias.c:43:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zat_most, od->optMaxCt, od->pz_Name, eqv); data/sharutils-4.15.2/libopts/alias.c:45:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zonly_one, od->pz_Name, eqv); data/sharutils-4.15.2/libopts/autoopts.c:46:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define vsnprintf option_vsnprintf data/sharutils-4.15.2/libopts/autoopts.c:47:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf option_snprintf data/sharutils-4.15.2/libopts/autoopts.c:67:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zalloc_fail, (int)sz); data/sharutils-4.15.2/libopts/autoopts.c:80:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zrealloc_fail, (int)sz, p); data/sharutils-4.15.2/libopts/autoopts.c:93:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zalloc_fail, (int)strlen(str)); data/sharutils-4.15.2/libopts/autoopts.c:156:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zmultiway_bug, eqv_od->pz_Name, od->pz_Name, data/sharutils-4.15.2/libopts/autoopts.c:231:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNotCmdOpt, o_st->pOD->pz_Name); data/sharutils-4.15.2/libopts/check.c:44:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zneed_fmt, pOpts->pzProgName, data/sharutils-4.15.2/libopts/check.c:58:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zconflict_fmt, pOpts->pzProgName, data/sharutils-4.15.2/libopts/check.c:92:10: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zneed_more, pOpts->pzProgName, pOD->pz_Name, data/sharutils-4.15.2/libopts/check.c:94:10: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. else fprintf(stderr, zneed_one, pOpts->pzProgName, pOD->pz_Name); data/sharutils-4.15.2/libopts/check.c:151:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNoArgs, pOpts->pzProgName); data/sharutils-4.15.2/libopts/check.c:161:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zargs_must, pOpts->pzProgName); data/sharutils-4.15.2/libopts/compat/compat.h:87:17: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # error This system cannot support daemon processing data/sharutils-4.15.2/libopts/compat/pathfind.c:84:21: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(abs_name, mode_bits) >= 0) { data/sharutils-4.15.2/libopts/compat/pathfind.c:121:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( result, dot_path ); data/sharutils-4.15.2/libopts/compat/pathfind.c:133:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( result + result_len, string ); data/sharutils-4.15.2/libopts/compat/pathfind.c:185:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( result + start + 1, result + i ); data/sharutils-4.15.2/libopts/compat/pathfind.c:204:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( result + i, result + i + 1 ); data/sharutils-4.15.2/libopts/compat/pathfind.c:214:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( result + start + 1, result + i + 2 ); data/sharutils-4.15.2/libopts/compat/snprintf.c:29:1: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(char *str, size_t n, char const *fmt, ...) data/sharutils-4.15.2/libopts/compat/snprintf.c:37:10: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. rp = vsprintf(str, fmt, ap); data/sharutils-4.15.2/libopts/compat/snprintf.c:43:12: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. rval = vsprintf(str, fmt, ap); data/sharutils-4.15.2/libopts/compat/snprintf.c:55:1: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf( char *str, size_t n, char const *fmt, va_list ap ) data/sharutils-4.15.2/libopts/compat/snprintf.c:58:20: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. return (strlen(vsprintf(str, fmt, ap))); data/sharutils-4.15.2/libopts/compat/snprintf.c:60:13: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. return (vsprintf(str, fmt, ap)); data/sharutils-4.15.2/libopts/compat/strdup.c:19:16: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(cp, s); data/sharutils-4.15.2/libopts/compat/windows-config.h:46:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/sharutils-4.15.2/libopts/compat/windows-config.h:46:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/sharutils-4.15.2/libopts/configfile.c:740:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(z, "[%s]", opts->pzPROGNAME); data/sharutils-4.15.2/libopts/configfile.c:851:23: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. len = (size_t)sprintf(pz, fmt, pznm); data/sharutils-4.15.2/libopts/enum.c:74:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, pz_enum_err_fmt, pOpts->pzProgName, data/sharutils-4.15.2/libopts/enum.c:77:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zValidKeys, pOD->pz_Name); data/sharutils-4.15.2/libopts/enum.c:112:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, ENUM_ERR_LINE, *(paz_names++)); data/sharutils-4.15.2/libopts/enum.c:135:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(zFmt, ENUM_ERR_WIDTH, (int)max_len); data/sharutils-4.15.2/libopts/enum.c:148:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, NLSTR_SPACE_FMT, *(paz_names++)); data/sharutils-4.15.2/libopts/enum.c:153:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zFmt, *(paz_names++) ); data/sharutils-4.15.2/libopts/enum.c:155:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, NLSTR_FMT, *paz_names); data/sharutils-4.15.2/libopts/enum.c:159:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zIntRange, hidden, name_ct - 1 + hidden); data/sharutils-4.15.2/libopts/enum.c:166:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zLowerBits, name_ct); data/sharutils-4.15.2/libopts/enum.c:169:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zIntRange, hidden, name_ct - 1 + hidden); data/sharutils-4.15.2/libopts/enum.c:307:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(INVALID_FMT, ix); data/sharutils-4.15.2/libopts/find.c:114:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zambig_file, hyph, pOD->pz_Name); data/sharutils-4.15.2/libopts/find.c:119:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zambig_file, hyph, pOD->pz_DisableName); data/sharutils-4.15.2/libopts/find.c:217:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zDisabledErr, opts->pzProgName, pOD->pz_Name); data/sharutils-4.15.2/libopts/find.c:219:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, SET_OFF_FMT, pOD->pzText); data/sharutils-4.15.2/libopts/find.c:271:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zIllOptStr, opts->pzProgPath, name); data/sharutils-4.15.2/libopts/find.c:293:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zambig_opt_fmt, opts->pzProgPath, name, match_ct); data/sharutils-4.15.2/libopts/find.c:335:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zIllVendOptStr, pOpts->pzProgName, vopt_str); data/sharutils-4.15.2/libopts/find.c:385:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zInvalOptName, opts->pzProgName, opt_name); data/sharutils-4.15.2/libopts/find.c:430:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zDisabledErr, pOpts->pzProgPath, pRes->pz_Name); data/sharutils-4.15.2/libopts/find.c:432:21: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, SET_OFF_FMT, pRes->pzText); data/sharutils-4.15.2/libopts/find.c:469:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zIllOptChr, pOpts->pzProgPath, optValue); data/sharutils-4.15.2/libopts/find.c:527:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zMisArg, opts->pzProgPath, o_st->pOD->pz_Name); data/sharutils-4.15.2/libopts/find.c:632:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNoArg, pOpts->pzProgPath, o_st->pOD->pz_Name); data/sharutils-4.15.2/libopts/find.c:755:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zIllOptStr, opts->pzProgPath, opts->pzCurOpt-2); data/sharutils-4.15.2/libopts/init.c:84:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zwrong_ver, pname, NUM_TO_VER(opts->structVersion)); data/sharutils-4.15.2/libopts/load.c:253:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf + (pz - path) + 1, fname); data/sharutils-4.15.2/libopts/load.c:295:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s%s", dir_part, name); data/sharutils-4.15.2/libopts/makeshell.c:87:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zao_bug_msg, msg); data/sharutils-4.15.2/libopts/makeshell.c:94:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zfserr_fmt, prog, errno, strerror(errno), data/sharutils-4.15.2/libopts/makeshell.c:152:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LOPT_ARG_FMT, opts->pzPROGNAME); data/sharutils-4.15.2/libopts/makeshell.c:162:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LOPT_ARG_FMT, opts->pzPROGNAME); data/sharutils-4.15.2/libopts/makeshell.c:171:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(OPT_ARG_FMT, opts->pzPROGNAME); data/sharutils-4.15.2/libopts/makeshell.c:183:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LOPT_ARG_FMT, opts->pzPROGNAME); data/sharutils-4.15.2/libopts/makeshell.c:189:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(OPT_ARG_FMT, opts->pzPROGNAME); data/sharutils-4.15.2/libopts/makeshell.c:200:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SHOW_PROG_ENV, opts->pzPROGNAME); data/sharutils-4.15.2/libopts/makeshell.c:235:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SET_TEXT_FMT, prog, var); data/sharutils-4.15.2/libopts/makeshell.c:298:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SET_NO_TEXT_FMT, opts->pzPROGNAME, ttnames[which]); data/sharutils-4.15.2/libopts/makeshell.c:386:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SHELL_MAGIC, shell_prog); data/sharutils-4.15.2/libopts/makeshell.c:388:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(PREAMBLE_FMT, START_MARK, out_nm, tm_nm_buf); data/sharutils-4.15.2/libopts/makeshell.c:391:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(END_PRE_FMT, opts->pzPROGNAME); data/sharutils-4.15.2/libopts/makeshell.c:441:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(FINISH_LOOP, opts->pzPROGNAME); data/sharutils-4.15.2/libopts/makeshell.c:462:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(fmt, opts->pzPROGNAME, od->pz_NAME, min); data/sharutils-4.15.2/libopts/makeshell.c:529:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(fmt, opts->pzPROGNAME, od->pz_NAME, def_val); data/sharutils-4.15.2/libopts/makeshell.c:537:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(ECHO_N_EXIT, opts->pzPROGNAME, VER_STR); data/sharutils-4.15.2/libopts/makeshell.c:540:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(PAGE_USAGE_TEXT, opts->pzPROGNAME); data/sharutils-4.15.2/libopts/makeshell.c:543:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, NO_LOAD_WARN); data/sharutils-4.15.2/libopts/makeshell.c:544:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, YES_NEED_OPT_ARG); data/sharutils-4.15.2/libopts/makeshell.c:549:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, NO_SAVE_OPTS); data/sharutils-4.15.2/libopts/makeshell.c:550:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, OK_NEED_OPT_ARG); data/sharutils-4.15.2/libopts/makeshell.c:552:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(ECHO_N_EXIT, opts->pzPROGNAME, LONG_USE_STR); data/sharutils-4.15.2/libopts/makeshell.c:556:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SGL_ARG_FMT, opts->pzPROGNAME, od->pz_NAME); data/sharutils-4.15.2/libopts/makeshell.c:559:17: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(CHK_MAX_COUNT, opts->pzPROGNAME, data/sharutils-4.15.2/libopts/makeshell.c:562:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(MULTI_ARG_FMT, opts->pzPROGNAME, od->pz_NAME); data/sharutils-4.15.2/libopts/makeshell.c:569:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SET_MULTI_ARG, opts->pzPROGNAME, od->pz_NAME); data/sharutils-4.15.2/libopts/makeshell.c:570:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, NO_ARG_NEEDED); data/sharutils-4.15.2/libopts/makeshell.c:573:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SET_MULTI_ARG, opts->pzPROGNAME, od->pz_NAME); data/sharutils-4.15.2/libopts/makeshell.c:574:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, OK_NEED_OPT_ARG); data/sharutils-4.15.2/libopts/makeshell.c:577:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, YES_NEED_OPT_ARG); data/sharutils-4.15.2/libopts/makeshell.c:587:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, NO_SUPPRESS_LOAD); data/sharutils-4.15.2/libopts/makeshell.c:590:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(NO_SGL_ARG_FMT, opts->pzPROGNAME, data/sharutils-4.15.2/libopts/makeshell.c:593:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(NO_MULTI_ARG_FMT, opts->pzPROGNAME, data/sharutils-4.15.2/libopts/makeshell.c:596:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(LVL3_CMD, NO_ARG_NEEDED); data/sharutils-4.15.2/libopts/makeshell.c:619:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptionFlag, od->optValue); data/sharutils-4.15.2/libopts/makeshell.c:622:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(UNK_OPT_FMT, FLAG_STR, opts->pzPROGNAME); data/sharutils-4.15.2/libopts/makeshell.c:694:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptionPartName, name_bf); data/sharutils-4.15.2/libopts/makeshell.c:704:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptionFullName, name); data/sharutils-4.15.2/libopts/makeshell.c:742:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(UNK_OPT_FMT, OPTION_STR, opts->pzPROGNAME); data/sharutils-4.15.2/libopts/makeshell.c:921:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zGenshell, optionParseShellOptions->pzProgName); data/sharutils-4.15.2/libopts/nested.c:926:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, XML_HEX_BYTE_FMT, (ch & 0xFF)); data/sharutils-4.15.2/libopts/numeric.c:60:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zRangeErr, pOpts->pzProgName, data/sharutils-4.15.2/libopts/numeric.c:66:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zRangeScaled, pz_indent); data/sharutils-4.15.2/libopts/numeric.c:68:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, (rng_ct > 1) ? zRangeLie : zRangeOnly, pz_indent); data/sharutils-4.15.2/libopts/numeric.c:75:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zRangeExact, pz_indent, rng->rmin); data/sharutils-4.15.2/libopts/numeric.c:77:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zRangeUpto, pz_indent, rng->rmax); data/sharutils-4.15.2/libopts/numeric.c:79:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zRangeAbove, pz_indent, rng->rmin); data/sharutils-4.15.2/libopts/numeric.c:81:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zRange, pz_indent, rng->rmin, data/sharutils-4.15.2/libopts/numeric.c:164:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf( stderr, zNotNumber, opts->pzProgName, od->optArg.argString ); data/sharutils-4.15.2/libopts/pgusage.c:49:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(bf, bfsz, TMP_FILE_FMT, tmpdir, my_pid); data/sharutils-4.15.2/libopts/pgusage.c:90:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(res, bfsz, PAGE_USAGE_FMT, pager, fname); data/sharutils-4.15.2/libopts/pgusage.c:168:21: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ignore_val( system( fil_name)); data/sharutils-4.15.2/libopts/putshell.c:190:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(out, MK_STR_OCT_FMT, ch); data/sharutils-4.15.2/libopts/putshell.c:277:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(OPT_VAL_FMT, pOpts->pzPROGNAME, pOD->pz_NAME); data/sharutils-4.15.2/libopts/putshell.c:283:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(QUOT_ARG_FMT, pOD->optArg.argString); data/sharutils-4.15.2/libopts/putshell.c:288:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(OPT_END_FMT, pOpts->pzPROGNAME, pOD->pz_NAME); data/sharutils-4.15.2/libopts/putshell.c:297:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptNumFmt, pOpts->pzPROGNAME, pOD->pz_NAME, data/sharutils-4.15.2/libopts/putshell.c:315:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(SHOW_VAL_FMT, (unsigned long)val); data/sharutils-4.15.2/libopts/putshell.c:330:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptCookieCt, pOpts->pzPROGNAME, pOD->pz_NAME, ct); data/sharutils-4.15.2/libopts/putshell.c:333:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(ARG_BY_NUM_FMT, pOpts->pzPROGNAME, pOD->pz_NAME, data/sharutils-4.15.2/libopts/putshell.c:336:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(EXPORT_ARG_FMT, pOpts->pzPROGNAME, pOD->pz_NAME, data/sharutils-4.15.2/libopts/putshell.c:375:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptCtFmt, pOpts->curOptIdx-1); data/sharutils-4.15.2/libopts/putshell.c:403:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zEquivMode, pOpts->pzPROGNAME, pOD->pz_NAME, p->pz_NAME); data/sharutils-4.15.2/libopts/putshell.c:440:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptDisabl, pOpts->pzPROGNAME, pOD->pz_NAME, data/sharutils-4.15.2/libopts/putshell.c:451:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptNumFmt, pOpts->pzPROGNAME, pOD->pz_NAME, data/sharutils-4.15.2/libopts/putshell.c:471:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zFullOptFmt, pOpts->pzPROGNAME, pOD->pz_NAME, data/sharutils-4.15.2/libopts/putshell.c:483:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(zOptNumFmt, pOpts->pzPROGNAME, pOD->pz_NAME, data/sharutils-4.15.2/libopts/putshell.c:491:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(OPT_VAL_FMT, pOpts->pzPROGNAME, pOD->pz_NAME); data/sharutils-4.15.2/libopts/putshell.c:493:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(OPT_END_FMT, pOpts->pzPROGNAME, pOD->pz_NAME); data/sharutils-4.15.2/libopts/reset.c:93:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zreset_arg, pOpts->pzProgName, pOD->pz_Name); data/sharutils-4.15.2/libopts/reset.c:110:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zIllOptChr, pOpts->pzProgPath, *pzArg); data/sharutils-4.15.2/libopts/reset.c:118:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zIllOptStr, pOpts->pzProgPath, pzArg); data/sharutils-4.15.2/libopts/restore.c:143:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNoState, pzName); data/sharutils-4.15.2/libopts/save.c:131:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zsave_warn, opts->pzProgName); data/sharutils-4.15.2/libopts/save.c:132:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNotDef, pzDir); data/sharutils-4.15.2/libopts/save.c:152:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(pzFileName, "%s/%s", pzEnv, pzEndDir); data/sharutils-4.15.2/libopts/save.c:183:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zsave_warn, opts->pzProgName); data/sharutils-4.15.2/libopts/save.c:184:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNoStat, errno, strerror(errno), pzDir); data/sharutils-4.15.2/libopts/save.c:223:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(pzPath, "%s/%s", pzDir, opts->pzRcName); data/sharutils-4.15.2/libopts/save.c:237:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zsave_warn, opts->pzProgName); data/sharutils-4.15.2/libopts/save.c:238:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNoStat, errno, strerror(errno), data/sharutils-4.15.2/libopts/save.c:256:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zsave_warn, opts->pzProgName, pzDir); data/sharutils-4.15.2/libopts/save.c:351:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, NULL_ATR_FMT, ovp->pzName); data/sharutils-4.15.2/libopts/save.c:366:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, TYPE_ATR_FMT, ovp->pzName, typ); data/sharutils-4.15.2/libopts/save.c:386:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, END_XML_FMT, ovp->pzName); data/sharutils-4.15.2/libopts/save.c:392:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, NUMB_ATR_FMT, ovp->pzName, ovp->v.longVal); data/sharutils-4.15.2/libopts/save.c:396:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, BOOL_ATR_FMT, ovp->pzName, data/sharutils-4.15.2/libopts/save.c:411:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, OPEN_XML_FMT, name); data/sharutils-4.15.2/libopts/save.c:439:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, END_XML_FMT, name); data/sharutils-4.15.2/libopts/save.c:459:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, OPEN_CLOSE_FMT, name); data/sharutils-4.15.2/libopts/save.c:463:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, NESTED_OPT_FMT, name); data/sharutils-4.15.2/libopts/save.c:503:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, NESTED_OPT_FMT, p->pz_Name); data/sharutils-4.15.2/libopts/save.c:534:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zsave_warn, opts->pzProgName); data/sharutils-4.15.2/libopts/save.c:535:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNoCreat, errno, strerror(errno), pzFName); data/sharutils-4.15.2/libopts/save.c:556:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, zPresetFile, time_str); data/sharutils-4.15.2/libopts/time.c:50:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNotDuration, opts->pzProgName, od->optArg.argString); data/sharutils-4.15.2/libopts/time.c:94:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(envptr, fmt, opts->pzPkgDataDir); data/sharutils-4.15.2/libopts/time.c:99:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(envptr+8, R_OK) != 0) data/sharutils-4.15.2/libopts/time.c:111:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zNotDate, opts->pzProgName, data/sharutils-4.15.2/libopts/usage.c:330:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zoffer_usage_fmt, opts->pzProgName, help); data/sharutils-4.15.2/libopts/usage.c:352:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(line_fmt_buf, zFmtFmt, flen); data/sharutils-4.15.2/libopts/usage.c:357:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(line_fmt_buf, zFmtFmt, flen); data/sharutils-4.15.2/libopts/usage.c:409:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zPlsSendBugs, opts->pzBugAddr); data/sharutils-4.15.2/libopts/usage.c:437:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, PUTS_FMT, t); data/sharutils-4.15.2/libopts/usage.c:612:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, opts->pzUsageTitle, opts->pzProgName); data/sharutils-4.15.2/libopts/usage.c:652:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zReqOne, data/sharutils-4.15.2/libopts/usage.c:657:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zTabout + tab_skip_ct, data/sharutils-4.15.2/libopts/usage.c:677:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zProhibOne, data/sharutils-4.15.2/libopts/usage.c:684:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zTabout + tab_skip_ct, data/sharutils-4.15.2/libopts/usage.c:735:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, usefmt, z, od->pzText); data/sharutils-4.15.2/libopts/usage.c:747:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zbad_od, opts->pzProgName, od->pz_Name); data/sharutils-4.15.2/libopts/usage.c:773:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zTabout + tab_skip_ct, zVendOptsAre); data/sharutils-4.15.2/libopts/usage.c:787:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(vfmt, sizeof(vfmt), vfmtfmt, (unsigned int)nmlen + 4); data/sharutils-4.15.2/libopts/usage.c:837:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zDis + tab_skip_ct, od->pz_DisableName); data/sharutils-4.15.2/libopts/usage.c:873:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zalt_opt + tab_skip_ct, data/sharutils-4.15.2/libopts/usage.c:910:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zUpTo + tab_skip_ct, od->optMaxCt); break; data/sharutils-4.15.2/libopts/usage.c:918:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zMust + tab_skip_ct, data/sharutils-4.15.2/libopts/usage.c:971:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zPathFmt, path); data/sharutils-4.15.2/libopts/usage.c:1066:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(z, sizeof(z), at->pzOptFmt, atyp, od->pz_Name, data/sharutils-4.15.2/libopts/usage.c:1069:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, line_fmt_buf, z, od->pzText); data/sharutils-4.15.2/libopts/usage.c:1081:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zbad_od, opts->pzProgName, od->pz_Name); data/sharutils-4.15.2/libopts/usage.c:1117:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zDisabledOpt, od->pz_Name, why_pz); data/sharutils-4.15.2/libopts/usage.c:1125:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, argTypes.pzBrk, od->pzText, data/sharutils-4.15.2/libopts/usage.c:1148:21: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, argTypes.pzBrk, zAuto, title); data/sharutils-4.15.2/libopts/usage.c:1152:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, argTypes.pzBrk, zVendIntro, title); data/sharutils-4.15.2/libopts/usage.c:1194:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(option_usage_fp, zExamineFmt, opts->pzPROGNAME); data/sharutils-4.15.2/libopts/version.c:100:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, zPlsSendBugs, o->pzBugAddr); data/sharutils-4.15.2/libopts/version.c:121:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, zao_ver_fmt, optionVersion()); data/sharutils-4.15.2/libopts/version.c:129:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, zPlsSendBugs, opts->pzBugAddr); data/sharutils-4.15.2/libopts/version.c:168:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, zBadVerArg, ch); data/sharutils-4.15.2/src/shar-opts.c:1992:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/sharutils-4.15.2/src/shar-opts.c:2029:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/sharutils-4.15.2/src/shar.c:290:2: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf (_f, offtostr (Value, buf)); \ data/sharutils-4.15.2/src/shar.c:356:15: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. int len = snprintf (res, sz, fmt, what); data/sharutils-4.15.2/src/shar.c:397:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, show_all_status_z, test, good_quot, data/sharutils-4.15.2/src/shar.c:400:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, show_good_status_z, test, good_quot); data/sharutils-4.15.2/src/shar.c:404:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, show_bad_status_z, test, bad_quot, die_str); data/sharutils-4.15.2/src/shar.c:416:32: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. unsigned int len = (unsigned)snprintf (bf, sz, format_pz, arg_pz); data/sharutils-4.15.2/src/shar.c:420:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, echo_string_z, bf); data/sharutils-4.15.2/src/shar.c:517:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (local_name_copy + local_name_length, pzN); data/sharutils-4.15.2/src/shar.c:525:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (restore_name_copy + restore_name_length, pzN); data/sharutils-4.15.2/src/shar.c:654:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, md5check_z, SM_not_verifying_sums); data/sharutils-4.15.2/src/shar.c:687:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, timestamp_z, SM_time_not_set); data/sharutils-4.15.2/src/shar.c:703:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, seq_check_z, data/sharutils-4.15.2/src/shar.c:710:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, query_answers_z, data/sharutils-4.15.2/src/shar.c:773:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, dir_check_z, quoted_path); data/sharutils-4.15.2/src/shar.c:776:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, dir_create_z, quoted_path); data/sharutils-4.15.2/src/shar.c:837:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (local_name, 4)) data/sharutils-4.15.2/src/shar.c:872:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (fp, exist_note_z, msg); data/sharutils-4.15.2/src/shar.c:877:17: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. int len = snprintf (explain_text_fmt, sizeof (explain_text_fmt), data/sharutils-4.15.2/src/shar.c:886:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (fp, explain_text_fmt, "", ""); data/sharutils-4.15.2/src/shar.c:897:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (fp, file_leader_z, pz, ch, PACKAGE, VERSION, sharpid); data/sharutils-4.15.2/src/shar.c:922:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (fp, made_on_comment_z, buffer, OPT_ARG(SUBMITTER)); data/sharutils-4.15.2/src/shar.c:930:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (fp, source_dir_comment_z, c_dir); data/sharutils-4.15.2/src/shar.c:966:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, by, OPT_ARG(SUBMITTER), OPT_ARG(ARCHIVE_NAME), data/sharutils-4.15.2/src/shar.c:1009:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (bf, sz, SM_end_of_part, part_number, part_number+1); data/sharutils-4.15.2/src/shar.c:1010:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, echo_string_z, bf); data/sharutils-4.15.2/src/shar.c:1042:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (bf, len, part_z, part_number, nm); data/sharutils-4.15.2/src/shar.c:1043:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, file_leader_z, bf, "", PACKAGE, VERSION, sharpid); data/sharutils-4.15.2/src/shar.c:1112:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (command, cct_cmd, quoted_name); data/sharutils-4.15.2/src/shar.c:1115:18: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. FILE * pfp = popen (command, "r"); data/sharutils-4.15.2/src/shar.c:1131:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (bf, sz, SM_bad_size, restore_name, wc); data/sharutils-4.15.2/src/shar.c:1132:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, ck_chct_z, restore_name, wc, bf); data/sharutils-4.15.2/src/shar.c:1266:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (cmdline, cmpr_state->cmpr_cmd_fmt, data/sharutils-4.15.2/src/shar.c:1268:15: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. in_fp = popen (cmdline, "r" FOPEN_BINARY); data/sharutils-4.15.2/src/shar.c:1282:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (out_fp, mode_fmt_z, restore_name); data/sharutils-4.15.2/src/shar.c:1386:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (p, uu_cmd_fmt, q_local_name); data/sharutils-4.15.2/src/shar.c:1387:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (strcat (p, " "), restore_name); data/sharutils-4.15.2/src/shar.c:1396:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (p, cmpr_state->cmpr_cmd_fmt, cmpr_state->cmpr_level, data/sharutils-4.15.2/src/shar.c:1402:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (p, uu_cmd_fmt, restore_name); data/sharutils-4.15.2/src/shar.c:1410:20: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. FILE * in_fp = popen (cmdline, "r" FOPEN_TEXT); data/sharutils-4.15.2/src/shar.c:1490:7: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (bf, sz, SM_end_of_part, part_number, part_number + 1); data/sharutils-4.15.2/src/shar.c:1491:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, echo_string_z, bf); data/sharutils-4.15.2/src/shar.c:1504:7: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (bf, sz1, SM_s_end_of_part, nm, part_number); data/sharutils-4.15.2/src/shar.c:1505:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, echo_string_z, bf); data/sharutils-4.15.2/src/shar.c:1506:7: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (bf, sz1, SM_contin_in_part, restore, (long)part_number + 1); data/sharutils-4.15.2/src/shar.c:1507:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, echo_string_z, bf); data/sharutils-4.15.2/src/shar.c:1517:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, explain_text_fmt, explain_1_z, explain_2_z); data/sharutils-4.15.2/src/shar.c:1538:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, continue_archive_z, data/sharutils-4.15.2/src/shar.c:1553:11: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, SM_still_skipping, restore); data/sharutils-4.15.2/src/shar.c:1563:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, split_resume_z, data/sharutils-4.15.2/src/shar.c:1665:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (str_a, sz, SM_overwriting, rname); data/sharutils-4.15.2/src/shar.c:1669:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (str_b, sz, SM_overwrite, rname); data/sharutils-4.15.2/src/shar.c:1671:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, query_user_z, str_a, str_b); data/sharutils-4.15.2/src/shar.c:1675:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (str_b, sz, SM_skipping, rname); data/sharutils-4.15.2/src/shar.c:1676:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, query_check_z, SM_extract_aborted, str_b, str_b); data/sharutils-4.15.2/src/shar.c:1697:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (lname, R_OK)) data/sharutils-4.15.2/src/shar.c:1736:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, break_line_z, rname); data/sharutils-4.15.2/src/shar.c:1758:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, pre_exist_z, *rnameq_p); data/sharutils-4.15.2/src/shar.c:1776:7: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (bf, sz, SM_x_extracting, rname, file_type_remote); data/sharutils-4.15.2/src/shar.c:1777:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, echo_string_z, bf); data/sharutils-4.15.2/src/shar.c:1793:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, shar_touch_z, data/sharutils-4.15.2/src/shar.c:1817:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, SM_restore_mode, data/sharutils-4.15.2/src/shar.c:1832:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, md5test_z, rname_q, data/sharutils-4.15.2/src/shar.c:1946:11: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, cmpr_state->cmpr_unpack, rname_q); data/sharutils-4.15.2/src/shar.c:2052:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (output_filename, OPT_ARG(OUTPUT_PREFIX), ++part_number); data/sharutils-4.15.2/src/shar.c:2392:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (output, echo_string_z, SM_you_are_done); data/sharutils-4.15.2/src/unshar-opts.c:589:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, err_str, errno, strerror(errno), "stat", data/sharutils-4.15.2/src/unshar-opts.c:600:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, err_str, errno, strerror(errno), "fopen", data/sharutils-4.15.2/src/unshar-opts.c:666:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/sharutils-4.15.2/src/unshar-opts.c:703:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/sharutils-4.15.2/src/unshar.c:328:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (pz_fname, "%s/%s", pz_tmp, z_tmpfile); data/sharutils-4.15.2/src/unshar.c:382:25: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. FILE * shell_fp = popen (cmd, "w"); data/sharutils-4.15.2/src/uudecode-opts.c:440:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/sharutils-4.15.2/src/uudecode-opts.c:477:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/sharutils-4.15.2/src/uudecode.c:219:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (strcpy (w32homedir, homedrive), homepath); data/sharutils-4.15.2/src/uudecode.c:219:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcat (strcpy (w32homedir, homedrive), homepath); data/sharutils-4.15.2/src/uudecode.c:288:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (outname, "%s/%s", homedir, buf); data/sharutils-4.15.2/src/uudecode.c:299:8: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (!access(outname, F_OK)) data/sharutils-4.15.2/src/uuencode-opts.c:391:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/sharutils-4.15.2/src/uuencode-opts.c:428:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/sharutils-4.15.2/intl/dcigettext.c:141:7: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. char *getwd (); data/sharutils-4.15.2/intl/dcigettext.c:142:28: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. # define getcwd(buf, max) getwd (buf) data/sharutils-4.15.2/intl/dcigettext.c:864:33: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED"); data/sharutils-4.15.2/intl/dcigettext.c:1587:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. language = getenv ("LANGUAGE"); data/sharutils-4.15.2/intl/dcigettext.c:1627:24: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *value = getenv ("OUTPUT_CHARSET"); data/sharutils-4.15.2/intl/langprefs.c:327:31: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!cache_initialized && getenv ("GETTEXT_MUI") != NULL) data/sharutils-4.15.2/intl/localcharset.c:138:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. dir = getenv ("CHARSETALIASDIR"); data/sharutils-4.15.2/intl/localcharset.c:384:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LC_ALL"); data/sharutils-4.15.2/intl/localcharset.c:387:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LC_CTYPE"); data/sharutils-4.15.2/intl/localcharset.c:389:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LANG"); data/sharutils-4.15.2/intl/localcharset.c:445:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LC_ALL"); data/sharutils-4.15.2/intl/localcharset.c:448:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LC_CTYPE"); data/sharutils-4.15.2/intl/localcharset.c:450:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LANG"); data/sharutils-4.15.2/intl/localcharset.c:504:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LC_ALL"); data/sharutils-4.15.2/intl/localcharset.c:507:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LC_CTYPE"); data/sharutils-4.15.2/intl/localcharset.c:509:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LANG"); data/sharutils-4.15.2/intl/localename.c:1458:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv ("GETTEXT_MUI") != NULL) data/sharutils-4.15.2/intl/localename.c:2812:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. retval = getenv ("LC_ALL"); data/sharutils-4.15.2/intl/localename.c:2816:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. retval = getenv (categoryname); data/sharutils-4.15.2/intl/localename.c:2820:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. retval = getenv ("LANG"); data/sharutils-4.15.2/intl/lock.c:639:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&lock->lock); data/sharutils-4.15.2/intl/lock.c:657:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/sharutils-4.15.2/intl/lock.c:776:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&lock->lock); data/sharutils-4.15.2/intl/lock.c:797:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/sharutils-4.15.2/intl/lock.c:827:15: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/sharutils-4.15.2/intl/lock.c:851:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/sharutils-4.15.2/intl/lock.c:880:15: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/sharutils-4.15.2/intl/lock.c:895:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/sharutils-4.15.2/intl/lock.c:957:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&lock->lock); data/sharutils-4.15.2/intl/lock.c:979:9: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/sharutils-4.15.2/intl/lock.c:1026:11: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&once_control->lock); data/sharutils-4.15.2/intl/lock.c:1027:11: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&once_control->lock); data/sharutils-4.15.2/intl/lock.c:1046:15: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&once_control->lock); data/sharutils-4.15.2/intl/os2compat.c:49:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *root = getenv ("UNIXROOT"); data/sharutils-4.15.2/intl/os2compat.c:50:24: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *gnulocaledir = getenv ("GNULOCALEDIR"); data/sharutils-4.15.2/intl/os2compat.h:41:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. #define getenv _nl_getenv data/sharutils-4.15.2/lib/getopt.c:101:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. extern char *getenv (); data/sharutils-4.15.2/lib/getopt.c:237:47: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); data/sharutils-4.15.2/lib/getopt.c:1187:1: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt (int argc, char *const *argv, const char *optstring) data/sharutils-4.15.2/lib/getopt.c:1222:11: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt (argc, argv, "abc:d:0123456789"); data/sharutils-4.15.2/lib/getopt.in.h:59:9: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. # undef getopt data/sharutils-4.15.2/lib/getopt.in.h:60:9: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. # undef getopt_long data/sharutils-4.15.2/lib/getopt.in.h:70:10: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. # define getopt __GETOPT_ID (getopt) data/sharutils-4.15.2/lib/getopt.in.h:70:30: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. # define getopt __GETOPT_ID (getopt) data/sharutils-4.15.2/lib/getopt.in.h:71:10: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. # define getopt_long __GETOPT_ID (getopt_long) data/sharutils-4.15.2/lib/getopt.in.h:71:35: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. # define getopt_long __GETOPT_ID (getopt_long) data/sharutils-4.15.2/lib/getopt.in.h:232:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) data/sharutils-4.15.2/lib/getopt.in.h:236:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, data/sharutils-4.15.2/lib/getopt1.c:40:1: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, data/sharutils-4.15.2/lib/getopt1.c:105:11: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long (argc, argv, "abc:d:0123456789", data/sharutils-4.15.2/lib/localcharset.c:138:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. dir = getenv ("CHARSETALIASDIR"); data/sharutils-4.15.2/lib/localcharset.c:414:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LC_ALL"); data/sharutils-4.15.2/lib/localcharset.c:417:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LC_CTYPE"); data/sharutils-4.15.2/lib/localcharset.c:419:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LANG"); data/sharutils-4.15.2/lib/localcharset.c:475:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LC_ALL"); data/sharutils-4.15.2/lib/localcharset.c:478:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LC_CTYPE"); data/sharutils-4.15.2/lib/localcharset.c:480:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LANG"); data/sharutils-4.15.2/lib/localcharset.c:536:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LC_ALL"); data/sharutils-4.15.2/lib/localcharset.c:539:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LC_CTYPE"); data/sharutils-4.15.2/lib/localcharset.c:541:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LANG"); data/sharutils-4.15.2/lib/secure_getenv.c:39:10: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. return getenv (name); data/sharutils-4.15.2/lib/spawni.c:304:10: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. path = getenv ("PATH"); data/sharutils-4.15.2/lib/stdlib.in.h:558:19: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_FUNCDECL_SYS (random, long, (void)); data/sharutils-4.15.2/lib/stdlib.in.h:560:19: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_CXXALIAS_SYS (random, long, (void)); data/sharutils-4.15.2/lib/stdlib.in.h:561:19: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_CXXALIASWARN (random); data/sharutils-4.15.2/lib/stdlib.in.h:563:9: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. # undef random data/sharutils-4.15.2/lib/stdlib.in.h:565:18: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_WARN_ON_USE (random, "random is unportable - " data/sharutils-4.15.2/lib/stdlib.in.h:572:19: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); data/sharutils-4.15.2/lib/stdlib.in.h:574:19: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_CXXALIAS_SYS (srandom, void, (unsigned int seed)); data/sharutils-4.15.2/lib/stdlib.in.h:575:19: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_CXXALIASWARN (srandom); data/sharutils-4.15.2/lib/stdlib.in.h:577:9: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. # undef srandom data/sharutils-4.15.2/lib/stdlib.in.h:579:18: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_WARN_ON_USE (srandom, "srandom is unportable - " data/sharutils-4.15.2/lib/stdlib.in.h:603:19: [3] (random) setstate: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); data/sharutils-4.15.2/lib/stdlib.in.h:605:19: [3] (random) setstate: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); data/sharutils-4.15.2/lib/stdlib.in.h:606:19: [3] (random) setstate: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_CXXALIASWARN (setstate); data/sharutils-4.15.2/lib/stdlib.in.h:608:9: [3] (random) setstate: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. # undef setstate data/sharutils-4.15.2/lib/stdlib.in.h:610:18: [3] (random) setstate: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_WARN_ON_USE (setstate, "setstate is unportable - " data/sharutils-4.15.2/lib/stdlib.in.h:756:12: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. # define realpath rpl_realpath data/sharutils-4.15.2/lib/stdlib.in.h:758:19: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. _GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved) data/sharutils-4.15.2/lib/stdlib.in.h:760:19: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. _GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved)); data/sharutils-4.15.2/lib/stdlib.in.h:763:19: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. _GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved) data/sharutils-4.15.2/lib/stdlib.in.h:766:19: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. _GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved)); data/sharutils-4.15.2/lib/stdlib.in.h:768:19: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. _GL_CXXALIASWARN (realpath); data/sharutils-4.15.2/lib/stdlib.in.h:770:9: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. # undef realpath data/sharutils-4.15.2/lib/stdlib.in.h:772:18: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " data/sharutils-4.15.2/libopts/env.c:50:36: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char const * env_opts = getenv(pOpts->pzPROGNAME); data/sharutils-4.15.2/libopts/env.c:121:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. os->pzOptArg = getenv(env_name); data/sharutils-4.15.2/libopts/init.c:108:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. pz = pathfind(getenv("PATH"), (char *)pname, "rx"); data/sharutils-4.15.2/libopts/load.c:80:13: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (realpath(buf, z) == NULL) data/sharutils-4.15.2/libopts/load.c:228:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. path = pathfind(getenv("PATH"), (char *)prg_path, "rx"); data/sharutils-4.15.2/libopts/load.c:284:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. dir_part = getenv(buf); data/sharutils-4.15.2/libopts/makeshell.c:128:28: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. else if ((shell_prog = getenv("SHELL")), data/sharutils-4.15.2/libopts/pgusage.c:44:31: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char const * tmpdir = getenv(TMPDIR); data/sharutils-4.15.2/libopts/pgusage.c:78:45: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char const * pager = (char const *)getenv(PAGER_NAME); data/sharutils-4.15.2/libopts/save.c:120:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. pzEnv = getenv(z); data/sharutils-4.15.2/libopts/save.c:127:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. pzEnv = getenv(pzDir); data/sharutils-4.15.2/libopts/sort.c:194:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ( (getenv("POSIXLY_CORRECT") != NULL) data/sharutils-4.15.2/libopts/usage.c:114:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. txt = getenv("AUTOOPTS_USAGE"); data/sharutils-4.15.2/src/unshar.c:281:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char const * res = getenv ("TMPDIR"); data/sharutils-4.15.2/src/unshar.c:283:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. res = getenv ("TEMP"); data/sharutils-4.15.2/src/unshar.c:285:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. res = getenv ("TMP"); data/sharutils-4.15.2/src/unshar.c:294:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char const * res = getenv ("TMPDIR"); data/sharutils-4.15.2/src/uudecode.c:208:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char const * res = getenv("HOME"); data/sharutils-4.15.2/src/uudecode.c:213:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *homedrive = getenv ("HOMEDRIVE"); data/sharutils-4.15.2/src/uudecode.c:214:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *homepath = getenv ("HOMEPATH"); data/sharutils-4.15.2/src/uudecode.c:229:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char const * res = getenv("HOME"); data/sharutils-4.15.2/src/uudecode.c:325:28: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char const * p = getenv("POSIXLY_CORRECT"); data/sharutils-4.15.2/intl/bindtextdom.c:137:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result, dirname, len); data/sharutils-4.15.2/intl/bindtextdom.c:175:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result, codeset, len); data/sharutils-4.15.2/intl/bindtextdom.c:209:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (new_binding->domainname, domainname, len); data/sharutils-4.15.2/intl/bindtextdom.c:234:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result, dirname, len); data/sharutils-4.15.2/intl/bindtextdom.c:263:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result, codeset, len); data/sharutils-4.15.2/intl/dcigettext.c:266:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char appended[ZERO]; /* used if domain != NULL */ data/sharutils-4.15.2/intl/dcigettext.c:419:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char data[ZERO]; data/sharutils-4.15.2/intl/dcigettext.c:794:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (new_domainname, domainname, domainname_len + 1); data/sharutils-4.15.2/intl/dcigettext.c:1134:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (charset, charsetstr, len); data/sharutils-4.15.2/intl/dcigettext.c:1173:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tmp, outcharset, len); data/sharutils-4.15.2/intl/dcigettext.c:1174:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tmp + len, "//TRANSLIT", 10 + 1); data/sharutils-4.15.2/intl/dcigettext.c:1635:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (value_copy, value, len); data/sharutils-4.15.2/intl/dcigettext.c:1677:29: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return (void *) ((char *) memcpy (dest, src, n) + n); data/sharutils-4.15.2/intl/finddomain.c:137:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (locale, alias_value, len); data/sharutils-4.15.2/intl/gettextP.h:215:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char domainname[ZERO]; data/sharutils-4.15.2/intl/l10nflist.c:213:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (cp, dirlist, dirlist_len); data/sharutils-4.15.2/intl/langprefs.c:174:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char data[8 + 1]; data/sharutils-4.15.2/intl/langprefs.c:252:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/sharutils-4.15.2/intl/loadmsgcat.c:471:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). # define open(name, flags) open_not_cancel_2 (name, flags) data/sharutils-4.15.2/intl/loadmsgcat.c:833:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open (domain_file->filename, O_RDONLY | O_BINARY); data/sharutils-4.15.2/intl/loadmsgcat.c:1187:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (mem, static_segments, segsize); data/sharutils-4.15.2/intl/loadmsgcat.c:1196:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (mem, sysdep_segment_values[sysdepref], n); data/sharutils-4.15.2/intl/localcharset.c:150:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (file_name, dir, dir_len); data/sharutils-4.15.2/intl/localcharset.c:153:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (file_name + dir_len + add_slash, base, base_len + 1); data/sharutils-4.15.2/intl/localcharset.c:171:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open (file_name, data/sharutils-4.15.2/intl/localcharset.c:196:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf1[50+1]; data/sharutils-4.15.2/intl/localcharset.c:197:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf2[50+1]; data/sharutils-4.15.2/intl/localcharset.c:382:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[2 + 10 + 1]; data/sharutils-4.15.2/intl/localcharset.c:408:19: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buf, dot, modifier - dot); data/sharutils-4.15.2/intl/localcharset.c:426:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (buf, "CP%u", GetACP ()); data/sharutils-4.15.2/intl/localcharset.c:463:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[2 + 10 + 1]; data/sharutils-4.15.2/intl/localcharset.c:491:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (buf, "CP%u", GetACP ()); data/sharutils-4.15.2/intl/localcharset.c:498:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[2 + 10 + 1]; data/sharutils-4.15.2/intl/localcharset.c:527:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buf, dot, modifier - dot); data/sharutils-4.15.2/intl/localcharset.c:543:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (buf, "CP%u", cp[0]); data/sharutils-4.15.2/intl/localealias.c:228:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (full_fname, fname, fname_len); data/sharutils-4.15.2/intl/localealias.c:229:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile); data/sharutils-4.15.2/intl/localealias.c:235:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen (relocate (full_fname), "rc"); data/sharutils-4.15.2/intl/localealias.c:237:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen (relocate (full_fname), "r"); data/sharutils-4.15.2/intl/localealias.c:258:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[400]; data/sharutils-4.15.2/intl/localealias.c:351:22: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (const char *) memcpy (&string_space[string_space_act], data/sharutils-4.15.2/intl/localealias.c:356:22: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (const char *) memcpy (&string_space[string_space_act], data/sharutils-4.15.2/intl/localename.c:1159:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef struct { const char legacy[21+1]; const char unixy[5+1]; } data/sharutils-4.15.2/intl/localename.c:1159:51: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef struct { const char legacy[21+1]; const char unixy[5+1]; } data/sharutils-4.15.2/intl/localename.c:1297:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef struct { const char langtag[7+1]; const char unixy[12+1]; } data/sharutils-4.15.2/intl/localename.c:1297:51: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef struct { const char langtag[7+1]; const char unixy[12+1]; } data/sharutils-4.15.2/intl/localename.c:1327:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef struct { const char script[4+1]; const char unixy[9+1]; } data/sharutils-4.15.2/intl/localename.c:1327:50: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef struct { const char script[4+1]; const char unixy[9+1]; } data/sharutils-4.15.2/intl/localename.c:1460:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char namebuf[256]; data/sharutils-4.15.2/intl/localename.c:2517:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char lname[LC_MAX * (LOCALE_NAME_MAX_LENGTH + 1) + 1]; data/sharutils-4.15.2/intl/localename.c:2524:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char locval[2 * LOCALE_NAME_MAX_LENGTH + 1 + 1]; data/sharutils-4.15.2/intl/localename.c:2560:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char last_locale[1000]; data/sharutils-4.15.2/intl/localename.c:2616:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char contents[100]; /* has variable size */ data/sharutils-4.15.2/intl/localename.c:2647:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (new_node->contents, string, size); data/sharutils-4.15.2/intl/localename.c:2891:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[256]; data/sharutils-4.15.2/intl/log.c:89:22: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). last_logfile = fopen (logfilename, "a"); data/sharutils-4.15.2/intl/os2compat.c:40:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char libintl_nl_default_dirname[MAXPATHLEN+1]; data/sharutils-4.15.2/intl/os2compat.c:59:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (_nlos2_libdir, root, sl); data/sharutils-4.15.2/intl/os2compat.c:60:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1); data/sharutils-4.15.2/intl/os2compat.c:73:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (_nlos2_localealiaspath, root, sl); data/sharutils-4.15.2/intl/os2compat.c:74:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1); data/sharutils-4.15.2/intl/os2compat.c:87:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (_nlos2_localedir, root, sl); data/sharutils-4.15.2/intl/os2compat.c:88:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1); data/sharutils-4.15.2/intl/plural.c:1057:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; data/sharutils-4.15.2/intl/plural.c:1306:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char yymsgbuf[128]; data/sharutils-4.15.2/intl/printf-parse.c:122:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (memory, a->arg, a->count * sizeof (argument)); \ data/sharutils-4.15.2/intl/printf-parse.c:599:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (memory, d->dir, d->count * sizeof (DIRECTIVE)); data/sharutils-4.15.2/intl/printf.c:224:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (resultbuf, result, pruned_length); data/sharutils-4.15.2/intl/printf.c:401:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (resultbuf, result, pruned_length * sizeof (wchar_t)); data/sharutils-4.15.2/intl/relocatable.c:134:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (memory, orig_prefix_arg, orig_prefix_len + 1); data/sharutils-4.15.2/intl/relocatable.c:137:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (memory, curr_prefix_arg, curr_prefix_len + 1); data/sharutils-4.15.2/intl/relocatable.c:219:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (q, curr_pathname, p - curr_pathname); data/sharutils-4.15.2/intl/relocatable.c:288:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (curr_prefix, curr_installdir, curr_prefix_len); data/sharutils-4.15.2/intl/relocatable.c:322:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char location[MAX_PATH]; data/sharutils-4.15.2/intl/relocatable.c:352:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen ("/proc/self/maps", "r"); data/sharutils-4.15.2/intl/relocatable.c:486:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result, curr_prefix, curr_prefix_len); data/sharutils-4.15.2/intl/setlocale.c:640:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char llCC_buf[64]; data/sharutils-4.15.2/intl/setlocale.c:641:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ll_buf[64]; data/sharutils-4.15.2/intl/setlocale.c:642:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char CC_buf[64]; data/sharutils-4.15.2/intl/setlocale.c:711:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (ll_buf, llCC_buf, underscore - llCC_buf); data/sharutils-4.15.2/intl/setlocale.c:714:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (CC_buf, territory_start, territory_end - territory_start); data/sharutils-4.15.2/intl/setlocale.c:747:29: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64+64]; data/sharutils-4.15.2/intl/setlocale.c:751:29: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buf, part1, part1_len); data/sharutils-4.15.2/intl/setlocale.c:753:29: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buf + part1_len + 1, part2, part2_len); data/sharutils-4.15.2/intl/setlocale.c:794:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char lc_messages_name[64] = "C"; data/sharutils-4.15.2/intl/textdomain.c:99:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (new_domain, domainname, len); data/sharutils-4.15.2/intl/vasnprintf.c:143:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define DCHAR_CPY memcpy data/sharutils-4.15.2/intl/vasnprintf.c:284:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pointbuf[5]; data/sharutils-4.15.2/intl/vasnprintf.c:285:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (pointbuf, "%#.0f", 1.0); data/sharutils-4.15.2/intl/vasnprintf.c:509:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); data/sharutils-4.15.2/intl/vasnprintf.c:645:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); data/sharutils-4.15.2/intl/vasnprintf.c:2664:27: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ data/sharutils-4.15.2/intl/vasnprintf.c:2709:27: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ data/sharutils-4.15.2/intl/vasnprintf.c:2759:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ data/sharutils-4.15.2/intl/vasnprintf.c:2772:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tmpptr, cbuf, count); data/sharutils-4.15.2/intl/vasnprintf.c:2840:27: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ data/sharutils-4.15.2/intl/vasnprintf.c:2853:27: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result + length, cbuf, count); data/sharutils-4.15.2/intl/vasnprintf.c:2869:27: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ data/sharutils-4.15.2/intl/vasnprintf.c:2891:27: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result + length, cbuf, count); data/sharutils-4.15.2/intl/vasnprintf.c:3172:35: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ((char *) p, "%+d", exponent); data/sharutils-4.15.2/intl/vasnprintf.c:3178:35: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char expbuf[6 + 1]; data/sharutils-4.15.2/intl/vasnprintf.c:3180:35: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (expbuf, "%+d", exponent); data/sharutils-4.15.2/intl/vasnprintf.c:3323:35: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ((char *) p, "%+d", exponent); data/sharutils-4.15.2/intl/vasnprintf.c:3329:35: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char expbuf[6 + 1]; data/sharutils-4.15.2/intl/vasnprintf.c:3331:35: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (expbuf, "%+d", exponent); data/sharutils-4.15.2/intl/vasnprintf.c:3398:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result + length, tmp, count * sizeof (DCHAR_T)); data/sharutils-4.15.2/intl/vasnprintf.c:3783:37: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ((char *) p, "%+.2d", exponent); data/sharutils-4.15.2/intl/vasnprintf.c:3789:37: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char expbuf[6 + 1]; data/sharutils-4.15.2/intl/vasnprintf.c:3791:37: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (expbuf, "%+.2d", exponent); data/sharutils-4.15.2/intl/vasnprintf.c:3964:45: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ((char *) p, "%+.2d", exponent); data/sharutils-4.15.2/intl/vasnprintf.c:3970:45: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char expbuf[6 + 1]; data/sharutils-4.15.2/intl/vasnprintf.c:3972:45: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (expbuf, "%+.2d", exponent); data/sharutils-4.15.2/intl/vasnprintf.c:4262:39: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char expbuf[6 + 1]; data/sharutils-4.15.2/intl/vasnprintf.c:4455:47: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char expbuf[6 + 1]; data/sharutils-4.15.2/intl/vasnprintf.c:4581:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result + length, tmp, count * sizeof (DCHAR_T)); data/sharutils-4.15.2/intl/vasnprintf.c:4789:29: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (fbp, dp->width_start, n * sizeof (TCHAR_T)); data/sharutils-4.15.2/intl/vasnprintf.c:4810:29: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (fbp, dp->precision_start, n * sizeof (TCHAR_T)); data/sharutils-4.15.2/intl/vasnprintf.c:5506:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result + length, tmp, count * sizeof (DCHAR_T)); data/sharutils-4.15.2/lib/alloca.c:122:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char align[ALIGN_SIZE]; /* To force sizeof(header). */ data/sharutils-4.15.2/lib/at-func.c:89:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char proc_buf[OPENAT_BUFFER_SIZE]; data/sharutils-4.15.2/lib/base64.c:62:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char b64c[64] = data/sharutils-4.15.2/lib/base64.c:252:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const signed char b64[0x100] = { data/sharutils-4.15.2/lib/base64.h:38:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4]; data/sharutils-4.15.2/lib/basename.c:51:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (p + 2, base, length); data/sharutils-4.15.2/lib/dirent-private.h:37:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dir_name_mask[1]; data/sharutils-4.15.2/lib/dirent.in.h:41:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d_name[1]; data/sharutils-4.15.2/lib/dirname-lgpl.c:81:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dir, file, length); data/sharutils-4.15.2/lib/error.c:176:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errbuf[1024]; data/sharutils-4.15.2/lib/fcntl.c:56:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char fds_to_close[OPEN_MAX_MAX / CHAR_BIT]; data/sharutils-4.15.2/lib/fcntl.in.h:111:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). # undef open data/sharutils-4.15.2/lib/fcntl.in.h:112:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). # define open rpl_open data/sharutils-4.15.2/lib/fcntl.in.h:114:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) data/sharutils-4.15.2/lib/fcntl.in.h:116:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); data/sharutils-4.15.2/lib/fcntl.in.h:118:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); data/sharutils-4.15.2/lib/fcntl.in.h:123:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). _GL_CXXALIASWARN (open); data/sharutils-4.15.2/lib/fcntl.in.h:126:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). # undef open data/sharutils-4.15.2/lib/fcntl.in.h:128:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). _GL_WARN_ON_USE (open, "open is not always POSIX compliant - " data/sharutils-4.15.2/lib/fdopendir.c:146:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[OPENAT_BUFFER_SIZE]; data/sharutils-4.15.2/lib/filenamecat-lgpl.c:31:47: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N))) data/sharutils-4.15.2/lib/fseeko.c:61:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *tmp = fopen ("/dev/null", "r"); data/sharutils-4.15.2/lib/ftello.c:76:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *tmp = fopen ("/dev/null", "r"); data/sharutils-4.15.2/lib/getcwd-lgpl.c:80:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[4032]; data/sharutils-4.15.2/lib/getcwd.c:128:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dots[DEEP_NESTING * sizeof ".." + BIG_FILE_NAME_COMPONENT_LENGTH + 1]; data/sharutils-4.15.2/lib/getcwd.c:168:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char big_buffer[BIG_FILE_NAME_LENGTH + 1]; data/sharutils-4.15.2/lib/getcwd.c:345:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dotlist + dotlen, d->d_name, _D_ALLOC_NAMLEN (d)); data/sharutils-4.15.2/lib/getcwd.c:381:22: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. dirp = memcpy (tmp + allocated - (oldsize - dirroom), data/sharutils-4.15.2/lib/getcwd.c:388:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dirp, d->d_name, namlen); data/sharutils-4.15.2/lib/gettext.h:218:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg_ctxt_id[msgctxt_len + msgid_len]; data/sharutils-4.15.2/lib/gettext.h:220:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/sharutils-4.15.2/lib/gettext.h:228:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); data/sharutils-4.15.2/lib/gettext.h:230:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/sharutils-4.15.2/lib/gettext.h:264:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg_ctxt_id[msgctxt_len + msgid_len]; data/sharutils-4.15.2/lib/gettext.h:266:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/sharutils-4.15.2/lib/gettext.h:274:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); data/sharutils-4.15.2/lib/gettext.h:276:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/sharutils-4.15.2/lib/idcache.c:44:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[FLEXIBLE_ARRAY_MEMBER]; data/sharutils-4.15.2/lib/localcharset.c:150:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (file_name, dir, dir_len); data/sharutils-4.15.2/lib/localcharset.c:153:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (file_name + dir_len + add_slash, base, base_len + 1); data/sharutils-4.15.2/lib/localcharset.c:171:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open (file_name, data/sharutils-4.15.2/lib/localcharset.c:196:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf1[50+1]; data/sharutils-4.15.2/lib/localcharset.c:197:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf2[50+1]; data/sharutils-4.15.2/lib/localcharset.c:412:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[2 + 10 + 1]; data/sharutils-4.15.2/lib/localcharset.c:438:19: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buf, dot, modifier - dot); data/sharutils-4.15.2/lib/localcharset.c:456:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (buf, "CP%u", GetACP ()); data/sharutils-4.15.2/lib/localcharset.c:493:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[2 + 10 + 1]; data/sharutils-4.15.2/lib/localcharset.c:521:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (buf, "CP%u", GetACP ()); data/sharutils-4.15.2/lib/localcharset.c:528:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[2 + 10 + 1]; data/sharutils-4.15.2/lib/localcharset.c:559:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buf, dot, modifier - dot); data/sharutils-4.15.2/lib/localcharset.c:577:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (buf, "CP%u", cp[0]); data/sharutils-4.15.2/lib/mbrtowc.c:36:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char internal_state[4]; data/sharutils-4.15.2/lib/mbrtowc.c:60:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4]; data/sharutils-4.15.2/lib/md5.c:70:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; data/sharutils-4.15.2/lib/md5.c:93:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (cp, &v, sizeof v); data/sharutils-4.15.2/lib/md5.c:128:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&((char *) ctx->buffer)[bytes], fillbuf, (size - 2) * 4 - bytes); data/sharutils-4.15.2/lib/md5.c:241:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&((char *) ctx->buffer)[left_over], buffer, add); data/sharutils-4.15.2/lib/md5.c:250:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (ctx->buffer, data/sharutils-4.15.2/lib/md5.c:267:32: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. md5_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx); data/sharutils-4.15.2/lib/md5.c:285:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&((char *) ctx->buffer)[left_over], buffer, len); data/sharutils-4.15.2/lib/md5.c:291:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (ctx->buffer, &ctx->buffer[16], left_over); data/sharutils-4.15.2/lib/mempcpy.c:27:19: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return (char *) memcpy (dest, src, n) + n; data/sharutils-4.15.2/lib/mkstemp.c:47:1: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). mkstemp (char *xtemplate) data/sharutils-4.15.2/lib/mktime.c:72:47: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. #define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; } data/sharutils-4.15.2/lib/mktime.c:665:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]); data/sharutils-4.15.2/lib/mktime.c:681:21: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). time_t from = atol (argv[1]); data/sharutils-4.15.2/lib/mktime.c:682:19: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). time_t by = atol (argv[2]); data/sharutils-4.15.2/lib/mktime.c:683:19: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). time_t to = atol (argv[3]); data/sharutils-4.15.2/lib/open.c:33:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return open (filename, flags, mode); data/sharutils-4.15.2/lib/open.c:53:1: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open (const char *filename, int flags, ...) data/sharutils-4.15.2/lib/open.c:135:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open ("/dev/null", flags, mode); data/sharutils-4.15.2/lib/openat-priv.h:47:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file); data/sharutils-4.15.2/lib/openat-priv.h:47:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file); data/sharutils-4.15.2/lib/openat-proc.c:47:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char * data/sharutils-4.15.2/lib/openat-proc.c:48:19: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file) data/sharutils-4.15.2/lib/openat-proc.c:69:26: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int proc_self_fd = open ("/proc/self/fd", data/sharutils-4.15.2/lib/openat-proc.c:80:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dotdot_buf[PROC_SELF_FD_NAME_SIZE_BOUND (sizeof "../fd" - 1)]; data/sharutils-4.15.2/lib/openat.c:197:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return open (file, flags, mode); data/sharutils-4.15.2/lib/openat.c:200:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[OPENAT_BUFFER_SIZE]; data/sharutils-4.15.2/lib/openat.c:204:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int open_result = open (proc_file, flags, mode); data/sharutils-4.15.2/lib/openat.c:241:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). err = open (file, flags, mode); data/sharutils-4.15.2/lib/openat.c:268:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open ("/", O_SEARCH); data/sharutils-4.15.2/lib/openat.c:272:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[OPENAT_BUFFER_SIZE]; data/sharutils-4.15.2/lib/opendir.c:56:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dir_name_mask[MAX_PATH + 1 + 1 + 1]; data/sharutils-4.15.2/lib/opendir.c:129:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&dirp->entry, &entry, sizeof (WIN32_FIND_DATA)); data/sharutils-4.15.2/lib/popen.c:80:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (open ("/dev/null", O_RDONLY) != STDIN_FILENO data/sharutils-4.15.2/lib/popen.c:87:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (open ("/dev/null", O_RDONLY) != STDOUT_FILENO data/sharutils-4.15.2/lib/quotearg.c:731:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char slot0[256]; data/sharutils-4.15.2/lib/save-cwd.c:67:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). cwd->desc = open (".", O_SEARCH); data/sharutils-4.15.2/lib/spawn-pipe.c:78:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). retval = open (pathname, oflag, mode); data/sharutils-4.15.2/lib/spawn-pipe.c:83:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). # undef open /* avoid warning on VMS */ data/sharutils-4.15.2/lib/spawn-pipe.c:84:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). # define open nonintr_open data/sharutils-4.15.2/lib/spawn-pipe.c:104:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. create_pipe (const char *progname, data/sharutils-4.15.2/lib/spawn-pipe.c:105:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_path, char **prog_argv, data/sharutils-4.15.2/lib/spawn-pipe.c:105:37: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_path, char **prog_argv, data/sharutils-4.15.2/lib/spawn-pipe.c:107:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_stdin, const char *prog_stdout, data/sharutils-4.15.2/lib/spawn-pipe.c:107:44: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_stdin, const char *prog_stdout, data/sharutils-4.15.2/lib/spawn-pipe.c:164:28: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). || ((nulloutfd = open ("NUL", O_RDWR, 0)) >= 0 data/sharutils-4.15.2/lib/spawn-pipe.c:170:26: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). || ((stdinfd = open (prog_stdin, O_RDONLY, 0)) >= 0 data/sharutils-4.15.2/lib/spawn-pipe.c:176:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). || ((stdoutfd = open (prog_stdout, O_WRONLY, 0)) >= 0 data/sharutils-4.15.2/lib/spawn-pipe.c:388:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. create_pipe_bidi (const char *progname, data/sharutils-4.15.2/lib/spawn-pipe.c:389:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_path, char **prog_argv, data/sharutils-4.15.2/lib/spawn-pipe.c:389:42: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_path, char **prog_argv, data/sharutils-4.15.2/lib/spawn-pipe.c:409:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. create_pipe_in (const char *progname, data/sharutils-4.15.2/lib/spawn-pipe.c:410:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_path, char **prog_argv, data/sharutils-4.15.2/lib/spawn-pipe.c:410:40: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_path, char **prog_argv, data/sharutils-4.15.2/lib/spawn-pipe.c:411:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_stdin, bool null_stderr, data/sharutils-4.15.2/lib/spawn-pipe.c:433:24: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. create_pipe_out (const char *progname, data/sharutils-4.15.2/lib/spawn-pipe.c:434:24: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_path, char **prog_argv, data/sharutils-4.15.2/lib/spawn-pipe.c:434:41: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_path, char **prog_argv, data/sharutils-4.15.2/lib/spawn-pipe.c:435:24: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_stdout, bool null_stderr, data/sharutils-4.15.2/lib/spawn-pipe.h:85:37: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern pid_t create_pipe_out (const char *progname, data/sharutils-4.15.2/lib/spawn-pipe.h:86:37: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_path, char **prog_argv, data/sharutils-4.15.2/lib/spawn-pipe.h:86:54: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_path, char **prog_argv, data/sharutils-4.15.2/lib/spawn-pipe.h:87:37: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_stdout, bool null_stderr, data/sharutils-4.15.2/lib/spawn-pipe.h:98:36: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern pid_t create_pipe_in (const char *progname, data/sharutils-4.15.2/lib/spawn-pipe.h:99:36: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_path, char **prog_argv, data/sharutils-4.15.2/lib/spawn-pipe.h:99:53: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_path, char **prog_argv, data/sharutils-4.15.2/lib/spawn-pipe.h:100:36: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_stdin, bool null_stderr, data/sharutils-4.15.2/lib/spawn-pipe.h:126:38: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern pid_t create_pipe_bidi (const char *progname, data/sharutils-4.15.2/lib/spawn-pipe.h:127:38: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_path, char **prog_argv, data/sharutils-4.15.2/lib/spawn-pipe.h:127:55: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *prog_path, char **prog_argv, data/sharutils-4.15.2/lib/spawn.in.h:179:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *_Restrict_ __path, data/sharutils-4.15.2/lib/spawn.in.h:182:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *const argv[_Restrict_arr_], data/sharutils-4.15.2/lib/spawn.in.h:183:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *const envp[_Restrict_arr_]) data/sharutils-4.15.2/lib/spawn.in.h:187:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *_Restrict_ __path, data/sharutils-4.15.2/lib/spawn.in.h:190:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *const argv[_Restrict_arr_], data/sharutils-4.15.2/lib/spawn.in.h:191:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *const envp[_Restrict_arr_])); data/sharutils-4.15.2/lib/spawn.in.h:196:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *_Restrict_ __path, data/sharutils-4.15.2/lib/spawn.in.h:199:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *const argv[_Restrict_arr_], data/sharutils-4.15.2/lib/spawn.in.h:200:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *const envp[_Restrict_arr_]) data/sharutils-4.15.2/lib/spawn.in.h:205:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *_Restrict_ __path, data/sharutils-4.15.2/lib/spawn.in.h:208:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *const argv[_Restrict_arr_], data/sharutils-4.15.2/lib/spawn.in.h:209:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *const envp[_Restrict_arr_])); data/sharutils-4.15.2/lib/spawnattr_setsigmask.c:30:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&attr->_ss, sigmask, sizeof (sigset_t)); data/sharutils-4.15.2/lib/spawni.c:47:26: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). # define open_not_cancel open data/sharutils-4.15.2/lib/spawni.c:77:10: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. # define vfork __vfork data/sharutils-4.15.2/lib/spawni.c:167:15: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. new_pid = vfork (); data/sharutils-4.15.2/lib/spawni.c:325:19: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. name = (char *) memcpy (name + pathlen + 1, file, len); data/sharutils-4.15.2/lib/spawni.c:342:27: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. startp = (char *) memcpy (name - (p - path), path, p - path); data/sharutils-4.15.2/lib/stat.c:109:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fixed_name[PATH_MAX + 1] = {0}; data/sharutils-4.15.2/lib/stdio-impl.h:51:35: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char _ubuf[3]; \ data/sharutils-4.15.2/lib/stdio-impl.h:52:35: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char _nbuf[1]; \ data/sharutils-4.15.2/lib/stdio.in.h:263:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). # undef fopen data/sharutils-4.15.2/lib/stdio.in.h:264:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). # define fopen rpl_fopen data/sharutils-4.15.2/lib/stdio.in.h:266:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). _GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode) data/sharutils-4.15.2/lib/stdio.in.h:268:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). _GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode)); data/sharutils-4.15.2/lib/stdio.in.h:270:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). _GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode)); data/sharutils-4.15.2/lib/stdio.in.h:272:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). _GL_CXXALIASWARN (fopen); data/sharutils-4.15.2/lib/stdio.in.h:274:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). # undef fopen data/sharutils-4.15.2/lib/stdio.in.h:276:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " data/sharutils-4.15.2/lib/stdio.in.h:1099:12: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). # define tmpfile rpl_tmpfile data/sharutils-4.15.2/lib/stdio.in.h:1101:19: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). _GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); data/sharutils-4.15.2/lib/stdio.in.h:1102:19: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). _GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); data/sharutils-4.15.2/lib/stdio.in.h:1104:19: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). _GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); data/sharutils-4.15.2/lib/stdio.in.h:1106:19: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). _GL_CXXALIASWARN (tmpfile); data/sharutils-4.15.2/lib/stdio.in.h:1108:9: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). # undef tmpfile data/sharutils-4.15.2/lib/stdio.in.h:1110:18: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " data/sharutils-4.15.2/lib/stdlib.in.h:398:12: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). # define mkstemp rpl_mkstemp data/sharutils-4.15.2/lib/stdlib.in.h:400:19: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). _GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); data/sharutils-4.15.2/lib/stdlib.in.h:401:19: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). _GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); data/sharutils-4.15.2/lib/stdlib.in.h:404:19: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). _GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); data/sharutils-4.15.2/lib/stdlib.in.h:406:19: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); data/sharutils-4.15.2/lib/stdlib.in.h:408:19: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). _GL_CXXALIASWARN (mkstemp); data/sharutils-4.15.2/lib/stdlib.in.h:410:9: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). # undef mkstemp data/sharutils-4.15.2/lib/stdlib.in.h:412:18: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " data/sharutils-4.15.2/lib/strdup.c:47:19: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return (char *) memcpy (new, s, len); data/sharutils-4.15.2/lib/strerror.c:39:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[STACKBUF_LEN]; data/sharutils-4.15.2/lib/strerror.c:69:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return memcpy (buf, msg, len + 1); data/sharutils-4.15.2/lib/strftime.c:86:26: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define MEMCPY(d, s, n) memcpy (d, s, n) data/sharutils-4.15.2/lib/strftime.c:822:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ufmt[5]; data/sharutils-4.15.2/lib/strftime.c:824:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ubuf[1024]; /* enough for any single format in practice */ data/sharutils-4.15.2/lib/strndup.c:35:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return memcpy (new, s, len); data/sharutils-4.15.2/lib/sys_socket.in.h:111:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char __ss_padding[_SS_PADSIZE]; data/sharutils-4.15.2/lib/sys_stat.in.h:704:44: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. _GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, data/sharutils-4.15.2/lib/sys_stat.in.h:707:44: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. _GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, data/sharutils-4.15.2/lib/sys_stat.in.h:711:44: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, data/sharutils-4.15.2/lib/sys_stat.in.h:715:44: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, data/sharutils-4.15.2/lib/sys_utsname.in.h:72:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nodename[_UTSNAME_NODENAME_LENGTH]; data/sharutils-4.15.2/lib/sys_utsname.in.h:75:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sysname[_UTSNAME_SYSNAME_LENGTH]; data/sharutils-4.15.2/lib/sys_utsname.in.h:77:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char release[_UTSNAME_RELEASE_LENGTH]; data/sharutils-4.15.2/lib/sys_utsname.in.h:79:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char version[_UTSNAME_VERSION_LENGTH]; data/sharutils-4.15.2/lib/sys_utsname.in.h:82:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char machine[_UTSNAME_MACHINE_LENGTH]; data/sharutils-4.15.2/lib/tempname.c:70:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). # define __open open data/sharutils-4.15.2/lib/tempname.c:171:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx); data/sharutils-4.15.2/lib/uname.c:64:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (&version, &versionex, sizeof (OSVERSIONINFO)); data/sharutils-4.15.2/lib/uname.c:75:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (buf->nodename, "localhost"); data/sharutils-4.15.2/lib/uname.c:183:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (buf->release, "Windows CE %u.%u", data/sharutils-4.15.2/lib/uname.c:208:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (buf->machine, "x86_64"); data/sharutils-4.15.2/lib/uname.c:211:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (buf->machine, "ia64"); data/sharutils-4.15.2/lib/uname.c:214:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (buf->machine, "i386"); data/sharutils-4.15.2/lib/uname.c:220:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (buf->machine, "i686"); data/sharutils-4.15.2/lib/uname.c:223:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (buf->machine, "mips"); data/sharutils-4.15.2/lib/uname.c:227:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (buf->machine, "alpha"); data/sharutils-4.15.2/lib/uname.c:230:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (buf->machine, "powerpc"); data/sharutils-4.15.2/lib/uname.c:233:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (buf->machine, "sh"); data/sharutils-4.15.2/lib/uname.c:236:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (buf->machine, "arm"); data/sharutils-4.15.2/lib/uname.c:239:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (buf->machine, "unknown"); data/sharutils-4.15.2/lib/uname.c:249:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (buf->machine, "x86_64"); data/sharutils-4.15.2/lib/uname.c:252:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (buf->machine, "ia64"); data/sharutils-4.15.2/lib/uname.c:256:15: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (buf->machine, "i%u", data/sharutils-4.15.2/lib/uname.c:259:15: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (buf->machine, "unknown"); data/sharutils-4.15.2/lib/wait-process.c:156:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (new_slaves, old_slaves, data/sharutils-4.15.2/lib/xmalloc.c:113:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return memcpy (xmalloc (s), p, s); data/sharutils-4.15.2/lib/xstrtol-error.c:55:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char option_buffer[2]; data/sharutils-4.15.2/libopts/ag-char-map.h:390:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char const * ag_char_map_spanners[46]; data/sharutils-4.15.2/libopts/ao-strs.c:41:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char const ao_strs_strtable[6633] = data/sharutils-4.15.2/libopts/ao-strs.h:328:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char const ao_strs_strtable[6633]; data/sharutils-4.15.2/libopts/autoopts.h:456:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char line_fmt_buf[32]; data/sharutils-4.15.2/libopts/autoopts/options.h:153:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char strVal[1]; ///< OPARG_TYPE_STRING data/sharutils-4.15.2/libopts/autoopts/options.h:199:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char const * apzArgs[MIN_ARG_ALLOC_CT]; ///< element array data/sharutils-4.15.2/libopts/autoopts/options.h:701:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char * tkn_list[1]; ///< array of pointers to tokens data/sharutils-4.15.2/libopts/autoopts/usage-txt.h:50:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char const * apz_str[104]; data/sharutils-4.15.2/libopts/autoopts/usage-txt.h:58:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char const option_lib_text[4285]; data/sharutils-4.15.2/libopts/autoopts/usage-txt.h:184:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char const option_lib_text[4285] = data/sharutils-4.15.2/libopts/compat/pathfind.c:45:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char zPath[ AG_PATH_MAX + 1 ]; data/sharutils-4.15.2/libopts/compat/windows-config.h:93:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #define open _open data/sharutils-4.15.2/libopts/configfile.c:615:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char const * dir_names[DIRECTIVE_TABLE 0]; data/sharutils-4.15.2/libopts/configfile.c:663:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ftxt, pz, len); data/sharutils-4.15.2/libopts/configfile.c:689:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ttl, ttlfmt, sizeof(ttlfmt) - 1); data/sharutils-4.15.2/libopts/configfile.c:690:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ttl + sizeof(ttlfmt) - 1, zCfgProg, ttl_len - (sizeof(ttlfmt) - 1)); data/sharutils-4.15.2/libopts/configfile.c:739:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char z[24]; data/sharutils-4.15.2/libopts/configfile.c:847:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char z[64], *pz = z; data/sharutils-4.15.2/libopts/configfile.c:878:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bf[4]; data/sharutils-4.15.2/libopts/configfile.c:1006:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char f_name[ AG_PATH_MAX+1 ]; data/sharutils-4.15.2/libopts/configfile.c:1074:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pz, opts->pzRcName, nln); data/sharutils-4.15.2/libopts/cook.c:91:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char z[4]; data/sharutils-4.15.2/libopts/cook.c:113:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char z[4]; data/sharutils-4.15.2/libopts/enum.c:133:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char zFmt[16]; /* format for all-but-last entries on a line */ data/sharutils-4.15.2/libopts/enum.c:218:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (strncmp((char *)paz_names[idx], (char *)name, len) == 0) { data/sharutils-4.15.2/libopts/enum.c:404:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pz, nm_list[ix], nln); data/sharutils-4.15.2/libopts/enum.c:408:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pz, PLUS_STR, PLUS_STR_LEN); data/sharutils-4.15.2/libopts/enum.c:492:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nm_buf[ AO_NAME_SIZE ]; data/sharutils-4.15.2/libopts/enum.c:494:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nm_buf, pz, len); data/sharutils-4.15.2/libopts/env.c:197:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char zEnvName[ AO_NAME_SIZE ]; data/sharutils-4.15.2/libopts/env.c:234:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pzFlagName, st.pOD->pz_NAME, nln); data/sharutils-4.15.2/libopts/env.c:255:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pzFlagName, st.pOD->pz_NAME, nln); data/sharutils-4.15.2/libopts/file.c:73:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, fname, l); data/sharutils-4.15.2/libopts/file.c:104:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(pOD->optArg.argString, mode.file_flags); data/sharutils-4.15.2/libopts/file.c:128:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE * fp = fopen(pOD->optArg.argString, mode.file_mode); data/sharutils-4.15.2/libopts/find.c:79:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, *nm_pp, (size_t)res); data/sharutils-4.15.2/libopts/find.c:373:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name_buf[128]; data/sharutils-4.15.2/libopts/genshell.c:67:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char const genshellopt_opt_strs[1769] = data/sharutils-4.15.2/libopts/gettext.h:218:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg_ctxt_id[msgctxt_len + msgid_len]; data/sharutils-4.15.2/libopts/gettext.h:220:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/sharutils-4.15.2/libopts/gettext.h:228:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); data/sharutils-4.15.2/libopts/gettext.h:230:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/sharutils-4.15.2/libopts/gettext.h:264:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg_ctxt_id[msgctxt_len + msgid_len]; data/sharutils-4.15.2/libopts/gettext.h:266:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/sharutils-4.15.2/libopts/gettext.h:274:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); data/sharutils-4.15.2/libopts/gettext.h:276:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/sharutils-4.15.2/libopts/load.c:71:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, pz, name_len + 1); data/sharutils-4.15.2/libopts/load.c:78:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char z[PATH_MAX+1]; data/sharutils-4.15.2/libopts/load.c:87:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, z, name_len + 1); data/sharutils-4.15.2/libopts/load.c:252:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, path, (size_t)((pz - path)+1)); data/sharutils-4.15.2/libopts/makeshell.c:361:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tm_nm_buf[AO_NAME_SIZE]; data/sharutils-4.15.2/libopts/makeshell.c:477:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char int_val_buf[32]; data/sharutils-4.15.2/libopts/makeshell.c:636:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name_bf[32]; data/sharutils-4.15.2/libopts/makeshell.c:690:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(name_bf, name, min_match_ct); data/sharutils-4.15.2/libopts/makeshell.c:759:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE * fp = fopen(fname, "r" FOPEN_BINARY_FLAG); data/sharutils-4.15.2/libopts/nested.c:37:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char xml_txt[8]; data/sharutils-4.15.2/libopts/nested.c:217:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pNV->pzName, name, nm_len); data/sharutils-4.15.2/libopts/nested.c:252:40: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). new_val->v.boolVal = (unsigned)atoi(val); data/sharutils-4.15.2/libopts/nested.c:258:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_val->pzName, name, nm_len); data/sharutils-4.15.2/libopts/nested.c:295:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_val->pzName, name, nm_len); data/sharutils-4.15.2/libopts/nested.c:324:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_val->pzName, name, nm_len); data/sharutils-4.15.2/libopts/nested.c:518:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char z[72] = "</"; data/sharutils-4.15.2/libopts/nested.c:613:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pz, val_str, v_len); data/sharutils-4.15.2/libopts/nested.c:766:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(res_val->pzName, name, nm_len); data/sharutils-4.15.2/libopts/parse-duration.c:193:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[8]; data/sharutils-4.15.2/libopts/parse-duration.c:202:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buf, in_pz, 4); data/sharutils-4.15.2/libopts/parse-duration.c:207:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buf, in_pz + 4, 2); data/sharutils-4.15.2/libopts/parse-duration.c:212:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buf, in_pz + 6, 2); data/sharutils-4.15.2/libopts/parse-duration.c:291:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4]; data/sharutils-4.15.2/libopts/parse-duration.c:300:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buf, in_pz, 2); data/sharutils-4.15.2/libopts/parse-duration.c:305:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buf, in_pz + 2, 2); data/sharutils-4.15.2/libopts/parse-duration.c:310:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buf, in_pz + 4, 2); data/sharutils-4.15.2/libopts/pgusage.c:55:18: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). int fd = mkstemp(bf); data/sharutils-4.15.2/libopts/putshell.c:167:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out, nl, nl_len); data/sharutils-4.15.2/libopts/restore.c:109:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, pOpts, sizeof(*p)); data/sharutils-4.15.2/libopts/restore.c:110:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p + 1, pOpts->pOptDesc, (size_t)p->optCt * sizeof(tOptDesc)); data/sharutils-4.15.2/libopts/restore.c:150:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pOpts, p, sizeof(*p)); data/sharutils-4.15.2/libopts/restore.c:151:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pOpts->pOptDesc, p+1, (size_t)p->optCt * sizeof(tOptDesc)); data/sharutils-4.15.2/libopts/restore.c:208:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pOpts, p, sizeof(*p)); data/sharutils-4.15.2/libopts/restore.c:209:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pOpts->pOptDesc, p+1, (size_t)p->optCt * sizeof(tOptDesc)); data/sharutils-4.15.2/libopts/save.c:115:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char z[ AO_NAME_SIZE ]; data/sharutils-4.15.2/libopts/save.c:118:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(z, pzDir, (size_t)(pzEndDir - pzDir)); data/sharutils-4.15.2/libopts/save.c:174:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char z[AG_PATH_MAX]; data/sharutils-4.15.2/libopts/save.c:203:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(z, pzDir, (size_t)(dirchp - pzDir)); data/sharutils-4.15.2/libopts/save.c:532:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(pzFName, "w" FOPEN_BINARY_FLAG); data/sharutils-4.15.2/libopts/save.c:653:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf+1, list, len + 1); data/sharutils-4.15.2/libopts/sort.c:317:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(opts->origArgVect + 1, opt_txt, data/sharutils-4.15.2/libopts/sort.c:320:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(opts->origArgVect + 1 + optsIdx, ppzOpds, data/sharutils-4.15.2/libopts/text_mmap.c:132:32: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). mapinfo->txt_zero_fd = open("/dev/zero", O_RDONLY); data/sharutils-4.15.2/libopts/text_mmap.c:197:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). mapinfo->txt_fd = open(fname, o_flag); data/sharutils-4.15.2/libopts/usage.c:285:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char help[24]; data/sharutils-4.15.2/libopts/usage.c:316:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(help, "-h"); data/sharutils-4.15.2/libopts/usage.c:321:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(help, "--help"); data/sharutils-4.15.2/libopts/usage.c:325:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(help, "help"); data/sharutils-4.15.2/libopts/usage.c:706:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char z[ 80 ]; data/sharutils-4.15.2/libopts/usage.c:765:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char vfmt[sizeof(vfmtfmt)]; data/sharutils-4.15.2/libopts/usage.c:942:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pth_buf[AG_PATH_MAX+1]; data/sharutils-4.15.2/libopts/usage.c:1035:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char z[80]; data/sharutils-4.15.2/src/encode.c:82:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[LINE_BUFFER_SIZE]; data/sharutils-4.15.2/src/scribble.c:34:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char sb_buf[1]; data/sharutils-4.15.2/src/shar-opts.c:73:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char const shar_opt_strs[10327] = data/sharutils-4.15.2/src/shar-opts.c:1545:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char const * const apzHomeList[2] = { data/sharutils-4.15.2/src/shar.c:162:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char explain_text_fmt[sizeof(explain_fmt_fmt_z)]; data/sharutils-4.15.2/src/shar.c:270:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char byte_is_binary[256]; data/sharutils-4.15.2/src/shar.c:289:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[INT_BUFSIZE_BOUND (off_t)]; \ data/sharutils-4.15.2/src/shar.c:419:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (bf + len, continue_z, sizeof (continue_z)); data/sharutils-4.15.2/src/shar.c:472:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (local_name_copy, local_name, local_name_length-1); data/sharutils-4.15.2/src/shar.c:479:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (restore_name_copy, restore_name, restore_name_length-1); data/sharutils-4.15.2/src/shar.c:570:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (local_name_copy, local_name, len + 1); data/sharutils-4.15.2/src/shar.c:623:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char result[12]; data/sharutils-4.15.2/src/shar.c:627:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (result, "----------"); data/sharutils-4.15.2/src/shar.c:853:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[INT_BUFSIZE_BOUND (off_t)]; data/sharutils-4.15.2/src/shar.c:880:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (explain_text_fmt, "#%-256s\n#%-256s\n"); data/sharutils-4.15.2/src/shar.c:908:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[sizeof (ftime_fmt) + 64]; data/sharutils-4.15.2/src/shar.c:1101:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char wc[1 + LOG10_MAX_INT * 2]; // enough for 64 bit size data/sharutils-4.15.2/src/shar.c:1173:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). infp = fopen (fname, "r" FOPEN_BINARY); data/sharutils-4.15.2/src/shar.c:1272:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). in_fp = fopen (local_name, "r" FOPEN_BINARY); data/sharutils-4.15.2/src/shar.c:1348:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buf+1, fname, nlen); data/sharutils-4.15.2/src/shar.c:1400:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat (p, " | "); data/sharutils-4.15.2/src/shar.c:1444:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). infp = fopen (local_name, "r" FOPEN_BINARY); data/sharutils-4.15.2/src/shar.c:1811:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char md5buffer[16]; data/sharutils-4.15.2/src/shar.c:1825:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). && (fp = fopen (lname, "r" FOPEN_BINARY)) != NULL data/sharutils-4.15.2/src/shar.c:2021:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (fmt, arg, len); data/sharutils-4.15.2/src/shar.c:2022:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (fmt + len, sfx, sizeof (sfx)); data/sharutils-4.15.2/src/shar.c:2053:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). output = fopen (output_filename, "w" FOPEN_BINARY); data/sharutils-4.15.2/src/shar.c:2115:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buffer, uname, len); data/sharutils-4.15.2/src/unshar-opts.c:79:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char const unshar_opt_strs[3905] = data/sharutils-4.15.2/src/unshar-opts.c:445:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char const * const apzHomeList[2] = { data/sharutils-4.15.2/src/unshar-opts.c:598:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fp = fopen(fname, "r"); data/sharutils-4.15.2/src/unshar.c:332:14: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). int fd = mkstemp (pz_fname); data/sharutils-4.15.2/src/uudecode-opts.c:73:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char const uudecode_opt_strs[4760] = data/sharutils-4.15.2/src/uudecode-opts.c:335:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char const * const apzHomeList[2] = { data/sharutils-4.15.2/src/uudecode.c:117:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[2 * BUFSIZ]; data/sharutils-4.15.2/src/uudecode.c:179:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf_in[2 * BUFSIZ]; data/sharutils-4.15.2/src/uudecode.c:180:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf_out[2 * BUFSIZ]; data/sharutils-4.15.2/src/uudecode.c:211:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char w32homedir[FILENAME_MAX]; data/sharutils-4.15.2/src/uudecode.c:349:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out, buf, sz); data/sharutils-4.15.2/src/uudecode.c:353:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (buf, tmp, sz); data/sharutils-4.15.2/src/uudecode.c:372:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[2 * BUFSIZ] = { NUL }; data/sharutils-4.15.2/src/uuencode-opts.c:71:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char const uuencode_opt_strs[4269] = data/sharutils-4.15.2/src/uuencode-opts.c:328:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char const * const apzHomeList[2] = { data/sharutils-4.15.2/src/uuencode.c:85:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char uu_std[64] = data/sharutils-4.15.2/src/uuencode.c:152:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[45]; data/sharutils-4.15.2/src/uuencode.c:153:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf_out[64]; data/sharutils-4.15.2/intl/bindtextdom.c:134:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (dirname) + 1; data/sharutils-4.15.2/intl/bindtextdom.c:172:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (codeset) + 1; data/sharutils-4.15.2/intl/bindtextdom.c:202:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (domainname) + 1; data/sharutils-4.15.2/intl/bindtextdom.c:230:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (dirname) + 1; data/sharutils-4.15.2/intl/bindtextdom.c:259:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (codeset) + 1; data/sharutils-4.15.2/intl/dcigettext.c:626:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t dirname_len = strlen (dirname) + 1; data/sharutils-4.15.2/intl/dcigettext.c:670:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). domainname_len = strlen (domainname); data/sharutils-4.15.2/intl/dcigettext.c:671:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). xdomainname = (char *) alloca (strlen (categoryname) data/sharutils-4.15.2/intl/dcigettext.c:680:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). single_locale = (char *) alloca (strlen (categoryvalue) + 1); data/sharutils-4.15.2/intl/dcigettext.c:777:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). msgid_len = strlen (msgid1) + 1; data/sharutils-4.15.2/intl/dcigettext.c:781:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size += strlen (localename) + 1; data/sharutils-4.15.2/intl/dcigettext.c:917:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nls_uint32 len = strlen (msgid); data/sharutils-4.15.2/intl/dcigettext.c:1127:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). charsetstr += strlen ("charset="); data/sharutils-4.15.2/intl/dcigettext.c:1171:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (outcharset); data/sharutils-4.15.2/intl/dcigettext.c:1631:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (value) + 1; data/sharutils-4.15.2/intl/eval-plural.h:86:13: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. case equal: data/sharutils-4.15.2/intl/finddomain.c:92:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen (dirname) + 1, 0, locale, NULL, NULL, data/sharutils-4.15.2/intl/finddomain.c:132:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (alias_value) + 1; data/sharutils-4.15.2/intl/finddomain.c:155:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen (dirname) + 1, mask, language, territory, data/sharutils-4.15.2/intl/l10nflist.c:96:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t part_len = strlen (argz); data/sharutils-4.15.2/intl/l10nflist.c:121:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t part_len = strlen (argz); data/sharutils-4.15.2/intl/l10nflist.c:195:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). + strlen (language) data/sharutils-4.15.2/intl/l10nflist.c:197:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ? strlen (territory) + 1 : 0) data/sharutils-4.15.2/intl/l10nflist.c:199:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ? strlen (codeset) + 1 : 0) data/sharutils-4.15.2/intl/l10nflist.c:201:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ? strlen (normalized_codeset) + 1 : 0) data/sharutils-4.15.2/intl/l10nflist.c:203:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ? strlen (modifier) + 1 : 0) data/sharutils-4.15.2/intl/l10nflist.c:204:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). + 1 + strlen (filename) + 1); data/sharutils-4.15.2/intl/l10nflist.c:324:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, data/sharutils-4.15.2/intl/langprefs.c:127:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). q = q2 + strlen (q2); data/sharutils-4.15.2/intl/langprefs.c:266:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size += strlen (buf) + 1; data/sharutils-4.15.2/intl/langprefs.c:298:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (buf); data/sharutils-4.15.2/intl/loadmsgcat.c:473:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define read(fd, buf, n) read_not_cancel (fd, buf, n) data/sharutils-4.15.2/intl/loadmsgcat.c:881:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long int nb = (long int) read (fd, read_ptr, to_read); data/sharutils-4.15.2/intl/loadmsgcat.c:1060:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). need += strlen (sysdep_segment_values[sysdepref]); data/sharutils-4.15.2/intl/loadmsgcat.c:1195:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen (sysdep_segment_values[sysdepref]); data/sharutils-4.15.2/intl/localcharset.c:104:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # undef getc data/sharutils-4.15.2/intl/localcharset.c:105:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define getc getc_unlocked data/sharutils-4.15.2/intl/localcharset.c:144:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t dir_len = strlen (dir); data/sharutils-4.15.2/intl/localcharset.c:145:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t base_len = strlen (base); data/sharutils-4.15.2/intl/localcharset.c:201:27: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc (fp); data/sharutils-4.15.2/intl/localcharset.c:210:33: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc (fp); data/sharutils-4.15.2/intl/localcharset.c:217:27: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) data/sharutils-4.15.2/intl/localcharset.c:219:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l1 = strlen (buf1); data/sharutils-4.15.2/intl/localcharset.c:220:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l2 = strlen (buf2); data/sharutils-4.15.2/intl/localcharset.c:557:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) data/sharutils-4.15.2/intl/localcharset.c:557:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) data/sharutils-4.15.2/intl/localcharset.c:561:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). codeset = aliases + strlen (aliases) + 1; data/sharutils-4.15.2/intl/localealias.c:322:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). alias_len = strlen (alias) + 1; data/sharutils-4.15.2/intl/localealias.c:323:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). value_len = strlen (value) + 1; data/sharutils-4.15.2/intl/localename.c:1360:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (name) == 7 && name[2] == '-') data/sharutils-4.15.2/intl/localename.c:2530:7: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat (locval, "_"); data/sharutils-4.15.2/intl/localename.c:2532:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). locval + strlen (locval), LOCALE_NAME_MAX_LENGTH)) data/sharutils-4.15.2/intl/localename.c:2534:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t locval_len = strlen (locval); data/sharutils-4.15.2/intl/localename.c:2570:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (lname, locale_name, sizeof (lname) - 1); data/sharutils-4.15.2/intl/localename.c:2640:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = strlen (string) + 1; data/sharutils-4.15.2/intl/log.c:85:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). last_logfilename = (char *) malloc (strlen (logfilename) + 1); data/sharutils-4.15.2/intl/log.c:96:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). print_escaped (logfile, domainname, domainname + strlen (domainname)); data/sharutils-4.15.2/intl/log.c:106:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). print_escaped (logfile, msgid1, msgid1 + strlen (msgid1)); data/sharutils-4.15.2/intl/log.c:110:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). print_escaped (logfile, msgid2, msgid2 + strlen (msgid2)); data/sharutils-4.15.2/intl/os2compat.c:57:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sl = strlen (root); data/sharutils-4.15.2/intl/os2compat.c:58:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1); data/sharutils-4.15.2/intl/os2compat.c:60:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1); data/sharutils-4.15.2/intl/os2compat.c:71:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sl = strlen (root); data/sharutils-4.15.2/intl/os2compat.c:72:58: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1); data/sharutils-4.15.2/intl/os2compat.c:74:67: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1); data/sharutils-4.15.2/intl/os2compat.c:85:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sl = strlen (root); data/sharutils-4.15.2/intl/os2compat.c:86:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1); data/sharutils-4.15.2/intl/os2compat.c:88:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1); data/sharutils-4.15.2/intl/os2compat.c:94:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (_nlos2_localedir) <= MAXPATHLEN) data/sharutils-4.15.2/intl/plural-exp.h:51:3: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. equal, /* Comparison for equality. */ data/sharutils-4.15.2/intl/plural.c:942:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define yystrlen strlen data/sharutils-4.15.2/intl/plural.c:1910:15: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. lval->op = equal; data/sharutils-4.15.2/intl/relocatable.c:127:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). orig_prefix_len = strlen (orig_prefix_arg); data/sharutils-4.15.2/intl/relocatable.c:128:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). curr_prefix_len = strlen (curr_prefix_arg); data/sharutils-4.15.2/intl/relocatable.c:195:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix)) data/sharutils-4.15.2/intl/relocatable.c:199:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rel_installdir = orig_installdir + strlen (orig_installprefix); data/sharutils-4.15.2/intl/relocatable.c:204:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const char *p = curr_pathname + strlen (curr_pathname); data/sharutils-4.15.2/intl/relocatable.c:227:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const char *rp = rel_installdir + strlen (rel_installdir); data/sharutils-4.15.2/intl/relocatable.c:228:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const char *cp = curr_installdir + strlen (curr_installdir); data/sharutils-4.15.2/intl/relocatable.c:366:26: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (c = getc (fp), c != EOF && c != '\n' && c != '/') data/sharutils-4.15.2/intl/relocatable.c:385:22: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (c = getc (fp), c != EOF && c != '\n') data/sharutils-4.15.2/intl/relocatable.c:465:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *result = (char *) xmalloc (strlen (curr_prefix) + 1); data/sharutils-4.15.2/intl/relocatable.c:480:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1); data/sharutils-4.15.2/intl/setlocale.c:652:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (locale) < sizeof (llCC_buf)) data/sharutils-4.15.2/intl/setlocale.c:709:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). territory_end = territory_start + strlen (territory_start); data/sharutils-4.15.2/intl/setlocale.c:744:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t part1_len = strlen (part1); data/sharutils-4.15.2/intl/setlocale.c:746:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t part2_len = strlen (part2) + 1; data/sharutils-4.15.2/intl/setlocale.c:805:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (lc_messages_name, locale, sizeof (lc_messages_name) - 1); data/sharutils-4.15.2/intl/textdomain.c:96:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (domainname) + 1; data/sharutils-4.15.2/intl/vasnprintf.c:229:24: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define local_wcslen wcslen data/sharutils-4.15.2/intl/vasnprintf.c:1731:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tmp_length = strlen (arg); data/sharutils-4.15.2/intl/vasnprintf.c:2563:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). arg_end = arg + strlen (arg); data/sharutils-4.15.2/intl/vasnprintf.c:3650:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ndigits = strlen (digits); data/sharutils-4.15.2/intl/vasnprintf.c:3710:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ndigits = strlen (digits); data/sharutils-4.15.2/intl/vasnprintf.c:3746:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (digits2) == precision + 1) data/sharutils-4.15.2/intl/vasnprintf.c:3846:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ndigits = strlen (digits); data/sharutils-4.15.2/intl/vasnprintf.c:3882:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (digits2) == precision) data/sharutils-4.15.2/intl/vasnprintf.c:4112:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ndigits = strlen (digits); data/sharutils-4.15.2/intl/vasnprintf.c:4169:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ndigits = strlen (digits); data/sharutils-4.15.2/intl/vasnprintf.c:4204:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (digits2) == precision + 1) data/sharutils-4.15.2/intl/vasnprintf.c:4317:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ndigits = strlen (digits); data/sharutils-4.15.2/intl/vasnprintf.c:4352:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (digits2) == precision) data/sharutils-4.15.2/lib/basename-lgpl.c:63:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--) data/sharutils-4.15.2/lib/chdir-long.c:117:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (dir); data/sharutils-4.15.2/lib/error.c:207:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (message) + 1; data/sharutils-4.15.2/lib/filenamecat-lgpl.c:69:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t baselen = strlen (base); data/sharutils-4.15.2/lib/fstatat.c:71:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (file); data/sharutils-4.15.2/lib/getcwd-lgpl.c:119:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). result = realloc (buf, strlen (buf) + 1); data/sharutils-4.15.2/lib/getcwd.c:45:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define _D_EXACT_NAMLEN(d) strlen ((d)->d_name) data/sharutils-4.15.2/lib/gethostname.c:55:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (name, uts.nodename, len); data/sharutils-4.15.2/lib/gethostname.c:57:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy (name, ""); /* Hardcode your system name if you want. */ data/sharutils-4.15.2/lib/getopt.c:268:56: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = d->__nonoption_flags_max_len = strlen (orig_str); data/sharutils-4.15.2/lib/getopt.c:516:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (namelen == (unsigned int) strlen (p->name)) data/sharutils-4.15.2/lib/getopt.c:622:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/sharutils-4.15.2/lib/getopt.c:698:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/sharutils-4.15.2/lib/getopt.c:738:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/sharutils-4.15.2/lib/getopt.c:743:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/sharutils-4.15.2/lib/getopt.c:936:63: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) data/sharutils-4.15.2/lib/getopt.c:984:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/sharutils-4.15.2/lib/getopt.c:1028:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/sharutils-4.15.2/lib/getopt.c:1066:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/sharutils-4.15.2/lib/getopt.c:1072:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/sharutils-4.15.2/lib/gettext.h:214:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgctxt_len = strlen (msgctxt) + 1; data/sharutils-4.15.2/lib/gettext.h:215:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgid_len = strlen (msgid) + 1; data/sharutils-4.15.2/lib/gettext.h:260:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgctxt_len = strlen (msgctxt) + 1; data/sharutils-4.15.2/lib/gettext.h:261:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgid_len = strlen (msgid) + 1; data/sharutils-4.15.2/lib/idcache.c:86:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). match = xmalloc (offsetof (struct userid, name) + strlen (name) + 1); data/sharutils-4.15.2/lib/idcache.c:123:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!pwent && strspn (user, digits) < strlen (user)) data/sharutils-4.15.2/lib/idcache.c:130:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tail = xmalloc (offsetof (struct userid, name) + strlen (user) + 1); data/sharutils-4.15.2/lib/idcache.c:168:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). match = xmalloc (offsetof (struct userid, name) + strlen (name) + 1); data/sharutils-4.15.2/lib/idcache.c:205:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!grent && strspn (group, digits) < strlen (group)) data/sharutils-4.15.2/lib/idcache.c:212:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tail = xmalloc (offsetof (struct userid, name) + strlen (group) + 1); data/sharutils-4.15.2/lib/localcharset.c:104:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # undef getc data/sharutils-4.15.2/lib/localcharset.c:105:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define getc getc_unlocked data/sharutils-4.15.2/lib/localcharset.c:144:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t dir_len = strlen (dir); data/sharutils-4.15.2/lib/localcharset.c:145:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t base_len = strlen (base); data/sharutils-4.15.2/lib/localcharset.c:201:27: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc (fp); data/sharutils-4.15.2/lib/localcharset.c:210:33: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc (fp); data/sharutils-4.15.2/lib/localcharset.c:217:27: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) data/sharutils-4.15.2/lib/localcharset.c:219:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l1 = strlen (buf1); data/sharutils-4.15.2/lib/localcharset.c:220:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l2 = strlen (buf2); data/sharutils-4.15.2/lib/localcharset.c:591:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) data/sharutils-4.15.2/lib/localcharset.c:591:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) data/sharutils-4.15.2/lib/localcharset.c:595:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). codeset = aliases + strlen (aliases) + 1; data/sharutils-4.15.2/lib/lstat.c:80:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (file); data/sharutils-4.15.2/lib/open.c:109:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (filename); data/sharutils-4.15.2/lib/open.c:160:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (filename); data/sharutils-4.15.2/lib/openat-proc.c:91:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t bufsize = PROC_SELF_FD_NAME_SIZE_BOUND (strlen (file)); data/sharutils-4.15.2/lib/openat.c:97:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (filename); data/sharutils-4.15.2/lib/openat.c:124:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (filename); data/sharutils-4.15.2/lib/opendir.c:82:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p = dir_name_mask + strlen (dir_name_mask); data/sharutils-4.15.2/lib/opendir.c:118:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). + strlen (dir_name_mask) + 1); data/sharutils-4.15.2/lib/quotearg.c:320:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). quote_string_len = strlen (quote_string); data/sharutils-4.15.2/lib/quotearg.c:356:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ? (argsize = strlen (arg)) : argsize)) data/sharutils-4.15.2/lib/quotearg.c:543:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). argsize = strlen (arg); data/sharutils-4.15.2/lib/spawni.c:321:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (file) + 1; data/sharutils-4.15.2/lib/spawni.c:322:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pathlen = strlen (path); data/sharutils-4.15.2/lib/stat.c:88:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (name); data/sharutils-4.15.2/lib/stat.c:110:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (name); data/sharutils-4.15.2/lib/stdio.in.h:234:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # undef fgetc data/sharutils-4.15.2/lib/stdio.in.h:235:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define fgetc rpl_fgetc data/sharutils-4.15.2/lib/stdio.in.h:237:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); data/sharutils-4.15.2/lib/stdio.in.h:238:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); data/sharutils-4.15.2/lib/stdio.in.h:240:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); data/sharutils-4.15.2/lib/stdio.in.h:242:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIASWARN (fgetc); data/sharutils-4.15.2/lib/stdio.in.h:621:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # undef getc data/sharutils-4.15.2/lib/stdio.in.h:622:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define getc rpl_fgetc data/sharutils-4.15.2/lib/stdio.in.h:624:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); data/sharutils-4.15.2/lib/stdio.in.h:625:21: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream)); data/sharutils-4.15.2/lib/stdio.in.h:627:19: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIAS_SYS (getc, int, (FILE *stream)); data/sharutils-4.15.2/lib/stdio.in.h:629:19: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIASWARN (getc); data/sharutils-4.15.2/lib/stdio.in.h:635:11: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # undef getchar data/sharutils-4.15.2/lib/stdio.in.h:636:12: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define getchar rpl_getchar data/sharutils-4.15.2/lib/stdio.in.h:638:19: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_FUNCDECL_RPL (getchar, int, (void)); data/sharutils-4.15.2/lib/stdio.in.h:639:19: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIAS_RPL (getchar, int, (void)); data/sharutils-4.15.2/lib/stdio.in.h:641:19: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIAS_SYS (getchar, int, (void)); data/sharutils-4.15.2/lib/stdio.in.h:643:19: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIASWARN (getchar); data/sharutils-4.15.2/lib/strdup.c:41:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (s) + 1; data/sharutils-4.15.2/lib/strerror.c:65:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (msg); data/sharutils-4.15.2/lib/strftime.c:87:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define STRLEN(s) strlen (s) data/sharutils-4.15.2/lib/strftime.c:575:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). format_end = f + strlen (f) + 1; data/sharutils-4.15.2/lib/strftime.c:587:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen (f + len); data/sharutils-4.15.2/lib/strftime.c:862:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (era->era_name); data/sharutils-4.15.2/lib/strftime.c:1340:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cpy (strlen (zone), zone); data/sharutils-4.15.2/lib/string.in.h:378:11: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. # undef strncat data/sharutils-4.15.2/lib/string.in.h:379:12: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. # define strncat rpl_strncat data/sharutils-4.15.2/lib/string.in.h:381:19: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. _GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n) data/sharutils-4.15.2/lib/string.in.h:383:19: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. _GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n)); data/sharutils-4.15.2/lib/string.in.h:385:19: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. _GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n)); data/sharutils-4.15.2/lib/string.in.h:387:19: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. _GL_CXXALIASWARN (strncat); data/sharutils-4.15.2/lib/string.in.h:389:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. # undef strncat data/sharutils-4.15.2/lib/string.in.h:391:18: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. _GL_WARN_ON_USE (strncat, "strncat is unportable - " data/sharutils-4.15.2/lib/tempname.c:132:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). plen = strlen (pfx); data/sharutils-4.15.2/lib/tempname.c:160:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dlen = strlen (dir); data/sharutils-4.15.2/lib/tempname.c:208:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (tmpl); data/sharutils-4.15.2/lib/unistd.in.h:1245:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # undef read data/sharutils-4.15.2/lib/unistd.in.h:1246:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define read rpl_read data/sharutils-4.15.2/lib/unistd.in.h:1248:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) data/sharutils-4.15.2/lib/unistd.in.h:1250:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); data/sharutils-4.15.2/lib/unistd.in.h:1255:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); data/sharutils-4.15.2/lib/unistd.in.h:1257:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIASWARN (read); data/sharutils-4.15.2/lib/unistd.in.h:1540:11: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. # undef usleep data/sharutils-4.15.2/lib/unistd.in.h:1541:12: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. # define usleep rpl_usleep data/sharutils-4.15.2/lib/unistd.in.h:1543:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); data/sharutils-4.15.2/lib/unistd.in.h:1544:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); data/sharutils-4.15.2/lib/unistd.in.h:1547:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); data/sharutils-4.15.2/lib/unistd.in.h:1549:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_CXXALIAS_SYS (usleep, int, (useconds_t n)); data/sharutils-4.15.2/lib/unistd.in.h:1551:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_CXXALIASWARN (usleep); data/sharutils-4.15.2/lib/unistd.in.h:1553:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. # undef usleep data/sharutils-4.15.2/lib/unistd.in.h:1555:18: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_WARN_ON_USE (usleep, "usleep is unportable - " data/sharutils-4.15.2/lib/unlocked-io.h:100:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # undef getc data/sharutils-4.15.2/lib/unlocked-io.h:101:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define getc(x) getc_unlocked (x) data/sharutils-4.15.2/lib/unlocked-io.h:103:28: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define getc_unlocked(x) getc (x) data/sharutils-4.15.2/lib/unlocked-io.h:107:10: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # undef getchar data/sharutils-4.15.2/lib/unlocked-io.h:108:11: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define getchar() getchar_unlocked () data/sharutils-4.15.2/lib/unlocked-io.h:110:30: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define getchar_unlocked() getchar () data/sharutils-4.15.2/lib/wchar.in.h:562:19: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE); data/sharutils-4.15.2/lib/wchar.in.h:564:19: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s)); data/sharutils-4.15.2/lib/wchar.in.h:565:19: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _GL_CXXALIASWARN (wcslen); data/sharutils-4.15.2/lib/wchar.in.h:567:9: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # undef wcslen data/sharutils-4.15.2/lib/wchar.in.h:569:18: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _GL_WARN_ON_USE (wcslen, "wcslen is unportable - " data/sharutils-4.15.2/lib/wchar.in.h:627:19: [1] (buffer) wcsncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). _GL_FUNCDECL_SYS (wcsncpy, wchar_t *, data/sharutils-4.15.2/lib/wchar.in.h:630:19: [1] (buffer) wcsncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). _GL_CXXALIAS_SYS (wcsncpy, wchar_t *, data/sharutils-4.15.2/lib/wchar.in.h:632:19: [1] (buffer) wcsncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). _GL_CXXALIASWARN (wcsncpy); data/sharutils-4.15.2/lib/wchar.in.h:634:9: [1] (buffer) wcsncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). # undef wcsncpy data/sharutils-4.15.2/lib/wchar.in.h:636:18: [1] (buffer) wcsncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " data/sharutils-4.15.2/lib/wchar.in.h:680:19: [1] (buffer) wcsncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or automatically resizing strings. _GL_FUNCDECL_SYS (wcsncat, wchar_t *, data/sharutils-4.15.2/lib/wchar.in.h:683:19: [1] (buffer) wcsncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or automatically resizing strings. _GL_CXXALIAS_SYS (wcsncat, wchar_t *, data/sharutils-4.15.2/lib/wchar.in.h:685:19: [1] (buffer) wcsncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or automatically resizing strings. _GL_CXXALIASWARN (wcsncat); data/sharutils-4.15.2/lib/wchar.in.h:687:9: [1] (buffer) wcsncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or automatically resizing strings. # undef wcsncat data/sharutils-4.15.2/lib/wchar.in.h:689:18: [1] (buffer) wcsncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or automatically resizing strings. _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " data/sharutils-4.15.2/lib/xmalloc.c:121:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return xmemdup (string, strlen (string) + 1); data/sharutils-4.15.2/libopts/ag-char-map.h:511:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (s >= e) e = s + strlen(s); data/sharutils-4.15.2/libopts/ag-char-map.h:522:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (s == e) e += strlen(e); data/sharutils-4.15.2/libopts/autoopts.c:93:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fprintf(stderr, zalloc_fail, (int)strlen(str)); data/sharutils-4.15.2/libopts/compat/compat.h:129:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define D_NAMLEN(dirent) strlen((dirent)->d_name) data/sharutils-4.15.2/libopts/compat/pathfind.c:120:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). result = malloc( 2 + strlen( dot_path ) + strlen( string ) ); data/sharutils-4.15.2/libopts/compat/pathfind.c:120:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). result = malloc( 2 + strlen( dot_path ) + strlen( string ) ); data/sharutils-4.15.2/libopts/compat/pathfind.c:122:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). result_len = (int)strlen(result); data/sharutils-4.15.2/libopts/compat/pathfind.c:128:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). result = malloc( 3 + strlen( string ) ); data/sharutils-4.15.2/libopts/compat/pathfind.c:243:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((unsigned)ix >= strlen( string )) data/sharutils-4.15.2/libopts/compat/snprintf.c:39:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rval = strlen(rp); data/sharutils-4.15.2/libopts/compat/snprintf.c:58:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return (strlen(vsprintf(str, fmt, ap))); data/sharutils-4.15.2/libopts/compat/strchr.c:48:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char const *e = s + strlen(s); data/sharutils-4.15.2/libopts/compat/strdup.c:16:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cp = (char *) AGALOC((unsigned) (strlen(s)+1), "strdup"); data/sharutils-4.15.2/libopts/compat/windows-config.h:95:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define read _read data/sharutils-4.15.2/libopts/configfile.c:132:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). res = optionLoadNested(txt, fname, strlen(fname)); data/sharutils-4.15.2/libopts/configfile.c:522:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return txt + strlen(txt); data/sharutils-4.15.2/libopts/configfile.c:628:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(dir_names[ix]); data/sharutils-4.15.2/libopts/configfile.c:685:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t ttl_len = sizeof(ttlfmt) + strlen(zCfgProg); data/sharutils-4.15.2/libopts/configfile.c:687:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t name_len = strlen(opts->pzProgName); data/sharutils-4.15.2/libopts/configfile.c:730:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(opts->pzPROGNAME); data/sharutils-4.15.2/libopts/configfile.c:843:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(pznm) + sizeof(fmt) - 2 /* for %s */; data/sharutils-4.15.2/libopts/configfile.c:1065:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(f_name); data/sharutils-4.15.2/libopts/configfile.c:1066:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t nln = strlen(opts->pzRcName) + 1; data/sharutils-4.15.2/libopts/enum.c:98:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(*(paz++)) + 1; data/sharutils-4.15.2/libopts/enum.c:192:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen((char *)name); data/sharutils-4.15.2/libopts/enum.c:383:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen(nm_list[ix]) + PLUS_STR_LEN + 1; data/sharutils-4.15.2/libopts/enum.c:403:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nln = strlen(nm_list[ix]); data/sharutils-4.15.2/libopts/env.c:229:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nln = strlen(st.pOD->pz_NAME) + 1; data/sharutils-4.15.2/libopts/env.c:250:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nln = strlen(st.pOD->pz_NAME) + 1; data/sharutils-4.15.2/libopts/find.c:295:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). opt_ambiguities(opts, name, (int)strlen(name)); data/sharutils-4.15.2/libopts/gettext.h:214:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgctxt_len = strlen (msgctxt) + 1; data/sharutils-4.15.2/libopts/gettext.h:215:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgid_len = strlen (msgid) + 1; data/sharutils-4.15.2/libopts/gettext.h:260:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgctxt_len = strlen (msgctxt) + 1; data/sharutils-4.15.2/libopts/gettext.h:261:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgid_len = strlen (msgid) + 1; data/sharutils-4.15.2/libopts/load.c:65:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name_len = strlen(pz); data/sharutils-4.15.2/libopts/load.c:83:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name_len = strlen(z); data/sharutils-4.15.2/libopts/load.c:148:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(fname); data/sharutils-4.15.2/libopts/load.c:249:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((unsigned)(pz - path) + 1 + strlen(fname) >= (unsigned)b_sz) data/sharutils-4.15.2/libopts/load.c:292:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(dir_part) + 1 + strlen(name) >= (unsigned)buf_sz) data/sharutils-4.15.2/libopts/load.c:292:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(dir_part) + 1 + strlen(name) >= (unsigned)buf_sz) data/sharutils-4.15.2/libopts/load.c:317:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t l = strlen(src) + 1; data/sharutils-4.15.2/libopts/load.c:322:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pzE = txt + strlen(txt); data/sharutils-4.15.2/libopts/load.c:355:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return txt + strlen(txt); data/sharutils-4.15.2/libopts/makeshell.c:240:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int ch = fgetc(fp); data/sharutils-4.15.2/libopts/makeshell.c:638:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned int max_match_ct = strlen(name) - 1; data/sharutils-4.15.2/libopts/makeshell.c:833:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). script_trailer = txt + strlen(txt) + START_MARK_LEN + 1; data/sharutils-4.15.2/libopts/nested.c:848:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). od->optArg.argString, od->pz_Name, strlen(od->pz_Name)); data/sharutils-4.15.2/libopts/parse-duration.c:184:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ps = pz + strlen (pz); data/sharutils-4.15.2/libopts/parse-duration.c:196:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (in_pz) != 8) data/sharutils-4.15.2/libopts/parse-duration.c:282:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ps = pz + strlen (pz); data/sharutils-4.15.2/libopts/parse-duration.c:294:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (in_pz) != 6) data/sharutils-4.15.2/libopts/parse-duration.c:396:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char * pe = pz + strlen (pz); data/sharutils-4.15.2/libopts/pgusage.c:47:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). bfsz = TMP_FILE_FMT_LEN + strlen(tmpdir) + 10; data/sharutils-4.15.2/libopts/pgusage.c:54:24: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mode_t svmsk = umask(cmask); data/sharutils-4.15.2/libopts/pgusage.c:56:15: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(svmsk); data/sharutils-4.15.2/libopts/pgusage.c:88:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). bfsz = 2 * strlen(fname) + strlen(pager) + PAGE_USAGE_FMT_LEN; data/sharutils-4.15.2/libopts/pgusage.c:88:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). bfsz = 2 * strlen(fname) + strlen(pager) + PAGE_USAGE_FMT_LEN; data/sharutils-4.15.2/libopts/putshell.c:131:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t nl_len = strlen(nl); data/sharutils-4.15.2/libopts/save.c:140:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen(pzEnv) + strlen(pzEndDir) + 2; data/sharutils-4.15.2/libopts/save.c:140:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen(pzEnv) + strlen(pzEndDir) + 2; data/sharutils-4.15.2/libopts/save.c:216:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen(pzDir) + strlen(opts->pzRcName) + 2; data/sharutils-4.15.2/libopts/save.c:216:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen(pzDir) + strlen(opts->pzRcName) + 2; data/sharutils-4.15.2/libopts/save.c:293:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). space_ct = 17 - strlen(pz); data/sharutils-4.15.2/libopts/save.c:650:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(list); data/sharutils-4.15.2/libopts/text_mmap.c:99:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t rdct = read(mapinfo->txt_fd, pz, sz); data/sharutils-4.15.2/libopts/time.c:93:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). envptr = AGALOC(sizeof(fmt) + strlen(opts->pzPkgDataDir), fmt); data/sharutils-4.15.2/libopts/usage.c:305:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(help + 2, od->pz_Name, 20); data/sharutils-4.15.2/libopts/usage.c:309:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(help, od->pz_Name, 20); data/sharutils-4.15.2/libopts/usage.c:469:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(text); data/sharutils-4.15.2/libopts/usage.c:783:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(od->pz_Name); data/sharutils-4.15.2/src/encode.c:65:19: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). character = getc (file); data/sharutils-4.15.2/src/shar.c:117:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define CRLF_STRLEN(_s) (strlen (_s) + 1) data/sharutils-4.15.2/src/shar.c:119:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define CRLF_STRLEN(_s) (strlen (_s)) data/sharutils-4.15.2/src/shar.c:133:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define NAMLEN(dirent) (strlen((dirent)->d_name)) data/sharutils-4.15.2/src/shar.c:354:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen (fmt) + strlen (what) + 2; data/sharutils-4.15.2/src/shar.c:354:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen (fmt) + strlen (what) + 2; data/sharutils-4.15.2/src/shar.c:414:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen (format_pz) + strlen (arg_pz) + sizeof (continue_z); data/sharutils-4.15.2/src/shar.c:414:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen (format_pz) + strlen (arg_pz) + sizeof (continue_z); data/sharutils-4.15.2/src/shar.c:469:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). local_name_length = strlen (local_name) + 1; data/sharutils-4.15.2/src/shar.c:476:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). restore_name_length = strlen (restore_name) + 1; data/sharutils-4.15.2/src/shar.c:566:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen (local_name); data/sharutils-4.15.2/src/shar.c:1007:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen (SM_end_of_part) + 2 * LOG10_MAX_INT; data/sharutils-4.15.2/src/shar.c:1040:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). off_t len = sizeof(part_z) + strlen(nm) + LOG10_MAX_INT; data/sharutils-4.15.2/src/shar.c:1059:16: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int ch = getc (pfp); data/sharutils-4.15.2/src/shar.c:1072:16: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int ch = getc (pfp); data/sharutils-4.15.2/src/shar.c:1111:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). command = alloca (sizeof(cct_cmd) + strlen (quoted_name)); data/sharutils-4.15.2/src/shar.c:1129:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen (SM_bad_size) + strlen (restore_name) + LOG10_MAX_INT; data/sharutils-4.15.2/src/shar.c:1129:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen (SM_bad_size) + strlen (restore_name) + LOG10_MAX_INT; data/sharutils-4.15.2/src/shar.c:1188:16: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int ch = getc (infp); data/sharutils-4.15.2/src/shar.c:1213:20: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = getc (infp); data/sharutils-4.15.2/src/shar.c:1260:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char * cmdline = alloca (strlen (q_local_name) + 64); data/sharutils-4.15.2/src/shar.c:1339:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t nlen = strlen (fname); data/sharutils-4.15.2/src/shar.c:1378:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sz += strlen (q_local_name) + strlen (restore_name); data/sharutils-4.15.2/src/shar.c:1378:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sz += strlen (q_local_name) + strlen (restore_name); data/sharutils-4.15.2/src/shar.c:1387:15: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat (strcat (p, " "), restore_name); data/sharutils-4.15.2/src/shar.c:1393:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sz += strlen (cmpr_state->cmpr_cmd_fmt) + LOG10_MAX_INT; data/sharutils-4.15.2/src/shar.c:1398:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (p); data/sharutils-4.15.2/src/shar.c:1401:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen (p); data/sharutils-4.15.2/src/shar.c:1488:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen (SM_end_of_part) + 2 * LOG10_MAX_INT; data/sharutils-4.15.2/src/shar.c:1497:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz1 = strlen (SM_s_end_of_part) + strlen (nm) + LOG10_MAX_INT; data/sharutils-4.15.2/src/shar.c:1497:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz1 = strlen (SM_s_end_of_part) + strlen (nm) + LOG10_MAX_INT; data/sharutils-4.15.2/src/shar.c:1498:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz2 = strlen (SM_contin_in_part) + strlen (restore) data/sharutils-4.15.2/src/shar.c:1498:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz2 = strlen (SM_contin_in_part) + strlen (restore) data/sharutils-4.15.2/src/shar.c:1586:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). e = p + strlen(p); data/sharutils-4.15.2/src/shar.c:1641:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (*inbf && inbf[strlen (inbf) - 1] != '\n') data/sharutils-4.15.2/src/shar.c:1660:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t rname_len = strlen (rname); data/sharutils-4.15.2/src/shar.c:1661:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen (SM_overwriting) + rname_len; data/sharutils-4.15.2/src/shar.c:1667:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sz = strlen (SM_overwrite) + rname_len; data/sharutils-4.15.2/src/shar.c:1673:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sz = strlen (SM_skipping) + rname_len; data/sharutils-4.15.2/src/shar.c:1773:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen (SM_x_extracting) data/sharutils-4.15.2/src/shar.c:1774:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). + strlen (rname) + strlen (file_type_remote); data/sharutils-4.15.2/src/shar.c:1774:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). + strlen (rname) + strlen (file_type_remote); data/sharutils-4.15.2/src/shar.c:2018:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (arg); data/sharutils-4.15.2/src/shar.c:2094:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pz += strlen (pz); data/sharutils-4.15.2/src/shar.c:2111:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen (uname); data/sharutils-4.15.2/src/shar.c:2135:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). here_delimiter_length = strlen (OPT_ARG(HERE_DELIMITER)); data/sharutils-4.15.2/src/unshar-opts.c:535:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). separator_str_len = strlen (pOptDesc->optArg.argString); data/sharutils-4.15.2/src/unshar.c:87:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ln = strlen (dir); data/sharutils-4.15.2/src/unshar.c:131:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ln = strlen (cmd); data/sharutils-4.15.2/src/unshar.c:163:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf = fnd + strlen (kw); data/sharutils-4.15.2/src/unshar.c:322:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name_size = strlen (pz_tmp) + sizeof (z_tmpfile) + 1; data/sharutils-4.15.2/src/uudecode.c:194:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (! base64_decode_ctx (&ctx, buf_in, strlen(buf_in), buf_out, &outlen)) data/sharutils-4.15.2/src/uudecode.c:282:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen (homedir) + strlen (buf) + 2; data/sharutils-4.15.2/src/uudecode.c:282:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen (homedir) + strlen (buf) + 2; data/sharutils-4.15.2/src/uudecode.c:337:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen (buf); data/sharutils-4.15.2/src/uudecode.c:459:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pz = outname + strlen (outname); data/sharutils-4.15.2/src/uuencode.c:179:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). wrct = strlen(buf_out); data/sharutils-4.15.2/src/uuencode.c:242:30: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). *mode = IRWALL_MODE & ~umask (IRWALL_MODE); data/sharutils-4.15.2/src/uuencode.c:253:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t nmlen = strlen (output_name); ANALYSIS SUMMARY: Hits = 1460 Lines analyzed = 96732 in approximately 3.53 seconds (27379 lines/second) Physical Source Lines of Code (SLOC) = 62178 Hits@level = [0] 157 [1] 361 [2] 467 [3] 107 [4] 502 [5] 23 Hits@level+ = [0+] 1617 [1+] 1460 [2+] 1099 [3+] 632 [4+] 525 [5+] 23 Hits/KSLOC@level+ = [0+] 26.006 [1+] 23.481 [2+] 17.6751 [3+] 10.1644 [4+] 8.4435 [5+] 0.369906 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.