gzip-1.14-1.fc44

List of Findings

Error: SHELLCHECK_WARNING (CWE-758): [#def1]
/etc/profile.d/colorzgrep.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
#    1|-> [ -f /usr/libexec/grepconf.sh ] || return
#    2|   
#    3|   /usr/libexec/grepconf.sh -c || return

Error: SHELLCHECK_WARNING (CWE-398): [#def2]
/usr/bin/gzexe:78:11: warning[SC2172]: Trapping signals by number is not well defined. Prefer signal names.
#   76|     test -n "$tmp" && rm -f "$tmp"
#   77|     (exit $res); exit $res
#   78|-> ' 0 1 2 3 5 10 13 15
#   79|   
#   80|   mktemp_status=

Error: SHELLCHECK_WARNING (CWE-398): [#def3]
/usr/bin/gzexe:78:13: warning[SC2172]: Trapping signals by number is not well defined. Prefer signal names.
#   76|     test -n "$tmp" && rm -f "$tmp"
#   77|     (exit $res); exit $res
#   78|-> ' 0 1 2 3 5 10 13 15
#   79|   
#   80|   mktemp_status=

Error: SHELLCHECK_WARNING (CWE-398): [#def4]
/usr/bin/gzexe:78:16: warning[SC2172]: Trapping signals by number is not well defined. Prefer signal names.
#   76|     test -n "$tmp" && rm -f "$tmp"
#   77|     (exit $res); exit $res
#   78|-> ' 0 1 2 3 5 10 13 15
#   79|   
#   80|   mktemp_status=

Error: SHELLCHECK_WARNING: [#def5]
/usr/bin/gzexe:88:9: warning[SC2319]: This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.
#   86|     esac
#   87|     if test ! -f "$file" || test ! -r "$file"; then
#   88|->     res=$?
#   89|       printf >&2 '%s\n' "$0: $i is not a readable regular file"
#   90|       continue

Error: SHELLCHECK_WARNING (CWE-456): [#def6]
/usr/bin/zdiff:22:9: warning[SC2209]: Use var=$(command) to assign output (or quote to assign string).
#   20|   case $1 in
#   21|     --__cmp) shift
#   22|->         prog=cmp;  cmp='${CMP-cmp}'  ;;
#   23|     *)    prog=diff; cmp='${DIFF-diff}';;
#   24|   esac

Error: SHELLCHECK_WARNING (CWE-456): [#def7]
/usr/bin/zdiff:23:9: warning[SC2209]: Use var=$(command) to assign output (or quote to assign string).
#   21|     --__cmp) shift
#   22|           prog=cmp;  cmp='${CMP-cmp}'  ;;
#   23|->   *)    prog=diff; cmp='${DIFF-diff}';;
#   24|   esac
#   25|   

Error: SHELLCHECK_WARNING (CWE-457): [#def8]
/usr/bin/zdiff:82:27: warning[SC2154]: prevarg is referenced but not assigned.
#   80|   case $needop in
#   81|   '') ;;
#   82|-> *) printf >&2 '%s\n' "$0: $prevarg: option requires an argument -- $needop"
#   83|      exit 2;;
#   84|   esac

Error: SHELLCHECK_WARNING (CWE-569): [#def9]
/usr/bin/zdiff:91:4: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#   89|   '') printf >&2 '%s\n' "$0: missing operand"; exit 2;;
#   90|   -) ;;
#   91|-> *) <"$file1" || exit 2;;
#   92|   esac
#   93|   case $file2 in

Error: SHELLCHECK_WARNING (CWE-569): [#def10]
/usr/bin/zdiff:95:4: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
#   93|   case $file2 in
#   94|   ''|-) ;;
#   95|-> *) <"$file2" || exit 2;;
#   96|   esac
#   97|   

Error: SHELLCHECK_WARNING (CWE-563): [#def11]
/usr/bin/zdiff:105:5: warning[SC2034]: FILE appears unused. Verify use (or export if used externally).
#  103|     case $file1 in
#  104|     *[-.]gz* | *[-.][zZ] | *.t[ga]z)
#  105|->     FILE=`LC_ALL=C expr "X$file1" : 'X\(.*\)[-.][zZtga]*$'`
#  106|       gzip_status=$(
#  107|         exec 4>&1

Error: SHELLCHECK_WARNING: [#def12]
/usr/bin/zdiff:137:31: error[SC1105]: Shells disambiguate (( differently or not at all. For subshell, add spaces around ( . For ((, fix parsing errors.
#  135|                             exec 4>&1
#  136|                             (gzip -cdfq -- "$file1" 4>&-; echo $? >&4) 3>&- |
#  137|->                               ((gzip -cdfq -- "$file2" 4>&-
#  138|                                   echo $? >&4) 3>&- 5<&- </dev/null |
#  139|                                  eval "$cmp" /dev/fd/5 - >&3) 5<&0

Error: SHELLCHECK_WARNING (CWE-156): [#def13]
/usr/bin/zgrep:283:28: warning[SC2046]: Quote this to prevent word splitting.
#  281|   fi
#  282|   
#  283|-> test 128 -le $res && kill -$(expr $res % 128) $$
#  284|   exit $res

Error: SHELLCHECK_WARNING (CWE-569): [#def14]
/usr/bin/zless:45:36: warning[SC2089]: Quotes/backslashes will be treated literally. Rewrite using set/"$@" or functions.
#   43|     newline='
#   44|   '
#   45|->   LESSMETACHARS="$space$tab$newline'"';*?"()<>[|&^`#\$%=~'
#   46|     export LESSMETACHARS
#   47|   fi

Error: SHELLCHECK_WARNING (CWE-569): [#def15]
/usr/bin/zless:46:10: warning[SC2090]: Quotes/backslashes in this variable will not be respected.
#   44|   '
#   45|     LESSMETACHARS="$space$tab$newline'"';*?"()<>[|&^`#\$%=~'
#   46|->   export LESSMETACHARS
#   47|   fi
#   48|   

Error: SHELLCHECK_WARNING (CWE-563): [#def16]
/usr/bin/znew:50:1: warning[SC2034]: files appears unused. Verify use (or export if used externally).
#   48|   pipe=0
#   49|   opt=
#   50|-> files=
#   51|   keep=0
#   52|   res=0

Error: SHELLCHECK_WARNING (CWE-156): [#def17]
/usr/bin/znew:138:31: warning[SC2046]: Quote this to prevent word splitting.
#  136|     fi
#  137|     test $keep -eq 1 && new=`wc -c < "$n$ext"`
#  138|->   if test $keep -eq 1 && test `expr \( $old + $block - 1 \) / $block` -lt \
#  139|                                 `expr \( $new + $block - 1 \) / $block`; then
#  140|       if test $pipe -eq 1; then

Error: SHELLCHECK_WARNING (CWE-156): [#def18]
/usr/bin/znew:139:31: warning[SC2046]: Quote this to prevent word splitting.
#  137|     test $keep -eq 1 && new=`wc -c < "$n$ext"`
#  138|     if test $keep -eq 1 && test `expr \( $old + $block - 1 \) / $block` -lt \
#  139|->                               `expr \( $new + $block - 1 \) / $block`; then
#  140|       if test $pipe -eq 1; then
#  141|         rm -f "$n$ext"

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
gzip-1.14/gzip.c:730:5: warning[-Wanalyzer-malloc-leak]: leak of 'entry'
gzip-1.14/gzip.c:1923:1: enter_function: entry to 'treat_dir'
gzip-1.14/gzip.c:1933:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1939:15: branch_false: ...to here
gzip-1.14/gzip.c:1939:15: acquire_memory: allocated here
gzip-1.14/gzip.c:1940:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1942:9: branch_false: ...to here
gzip-1.14/gzip.c:1944:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1944:8: branch_false: ...to here
gzip-1.14/gzip.c:1947:27: branch_true: following 'true' branch...
gzip-1.14/gzip.c:1948:22: branch_true: ...to here
gzip-1.14/gzip.c:1950:12: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1952:12: branch_true: following 'true' branch...
gzip-1.14/gzip.c:1953:13: call_function: inlined call to 'strcpy' from 'treat_dir'
gzip-1.14/gzip.c:1957:13: call_function: calling 'treat_file' from 'treat_dir'
#  728|       get_input_size_and_time ();
#  729|   
#  730|->     clear_bufs(); /* clear input and output buffers */
#  731|       to_stdout = 1;
#  732|       part_nb = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
gzip-1.14/gzip.c:1152:5: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(z_suffix)'
gzip-1.14/gzip.c:1766:1: enter_function: entry to 'shorten_name'
gzip-1.14/gzip.c:1775:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1781:9: branch_false: ...to here
gzip-1.14/gzip.c:1781:9: call_function: calling 'get_suffix' from 'shorten_name'
# 1150|   
# 1151|       char *z_lower = xstrdup(z_suffix);
# 1152|->     strlwr(z_lower);
# 1153|       known_suffixes[suffix_of_builtin
# 1154|                      ? sizeof known_suffixes / sizeof *known_suffixes - 2

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
gzip-1.14/gzip.c:1460:19: warning[-Wanalyzer-malloc-leak]: leak of 'entry'
gzip-1.14/gzip.c:1923:1: enter_function: entry to 'treat_dir'
gzip-1.14/gzip.c:1933:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1939:15: branch_false: ...to here
gzip-1.14/gzip.c:1939:15: acquire_memory: allocated here
gzip-1.14/gzip.c:1940:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1942:9: branch_false: ...to here
gzip-1.14/gzip.c:1944:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1944:8: branch_false: ...to here
gzip-1.14/gzip.c:1947:27: branch_true: following 'true' branch...
gzip-1.14/gzip.c:1948:22: branch_true: ...to here
gzip-1.14/gzip.c:1950:12: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1952:12: branch_true: following 'true' branch...
gzip-1.14/gzip.c:1953:13: call_function: inlined call to 'strcpy' from 'treat_dir'
gzip-1.14/gzip.c:1957:13: call_function: calling 'treat_file' from 'treat_dir'
# 1458|        */
# 1459|       if (force && to_stdout) {
# 1460|->         imagic0 = try_byte();
# 1461|           magic[0] = imagic0;
# 1462|           imagic1 = try_byte ();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
gzip-1.14/gzip.c:1462:19: warning[-Wanalyzer-malloc-leak]: leak of 'entry'
gzip-1.14/gzip.c:1923:1: enter_function: entry to 'treat_dir'
gzip-1.14/gzip.c:1933:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1939:15: branch_false: ...to here
gzip-1.14/gzip.c:1939:15: acquire_memory: allocated here
gzip-1.14/gzip.c:1940:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1942:9: branch_false: ...to here
gzip-1.14/gzip.c:1944:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1944:8: branch_false: ...to here
gzip-1.14/gzip.c:1947:27: branch_true: following 'true' branch...
gzip-1.14/gzip.c:1948:22: branch_true: ...to here
gzip-1.14/gzip.c:1950:12: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1952:12: branch_true: following 'true' branch...
gzip-1.14/gzip.c:1953:13: call_function: inlined call to 'strcpy' from 'treat_dir'
gzip-1.14/gzip.c:1957:13: call_function: calling 'treat_file' from 'treat_dir'
# 1460|           imagic0 = try_byte();
# 1461|           magic[0] = imagic0;
# 1462|->         imagic1 = try_byte ();
# 1463|           magic[1] = imagic1;
# 1464|           /* If try_byte returned EOF, magic[1] == (char) EOF.  */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
gzip-1.14/gzip.c:1466:20: warning[-Wanalyzer-malloc-leak]: leak of 'entry'
gzip-1.14/gzip.c:1923:1: enter_function: entry to 'treat_dir'
gzip-1.14/gzip.c:1933:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1939:15: branch_false: ...to here
gzip-1.14/gzip.c:1939:15: acquire_memory: allocated here
gzip-1.14/gzip.c:1940:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1942:9: branch_false: ...to here
gzip-1.14/gzip.c:1944:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1944:8: branch_false: ...to here
gzip-1.14/gzip.c:1947:27: branch_true: following 'true' branch...
gzip-1.14/gzip.c:1948:22: branch_true: ...to here
gzip-1.14/gzip.c:1950:12: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1952:12: branch_true: following 'true' branch...
gzip-1.14/gzip.c:1953:13: call_function: inlined call to 'strcpy' from 'treat_dir'
gzip-1.14/gzip.c:1957:13: call_function: calling 'treat_file' from 'treat_dir'
# 1464|           /* If try_byte returned EOF, magic[1] == (char) EOF.  */
# 1465|       } else {
# 1466|->         magic[0] = get_byte ();
# 1467|           imagic0 = 0;
# 1468|           if (magic[0]) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
gzip-1.14/gzip.c:1469:24: warning[-Wanalyzer-malloc-leak]: leak of 'entry'
gzip-1.14/gzip.c:1923:1: enter_function: entry to 'treat_dir'
gzip-1.14/gzip.c:1933:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1939:15: branch_false: ...to here
gzip-1.14/gzip.c:1939:15: acquire_memory: allocated here
gzip-1.14/gzip.c:1940:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1942:9: branch_false: ...to here
gzip-1.14/gzip.c:1944:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1944:8: branch_false: ...to here
gzip-1.14/gzip.c:1947:27: branch_true: following 'true' branch...
gzip-1.14/gzip.c:1948:22: branch_true: ...to here
gzip-1.14/gzip.c:1950:12: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1952:12: branch_true: following 'true' branch...
gzip-1.14/gzip.c:1953:13: call_function: inlined call to 'strcpy' from 'treat_dir'
gzip-1.14/gzip.c:1957:13: call_function: calling 'treat_file' from 'treat_dir'
# 1467|           imagic0 = 0;
# 1468|           if (magic[0]) {
# 1469|->             magic[1] = get_byte ();
# 1470|               imagic1 = 0; /* avoid lint warning */
# 1471|           } else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
gzip-1.14/gzip.c:1472:23: warning[-Wanalyzer-malloc-leak]: leak of 'entry'
gzip-1.14/gzip.c:1923:1: enter_function: entry to 'treat_dir'
gzip-1.14/gzip.c:1933:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1939:15: branch_false: ...to here
gzip-1.14/gzip.c:1939:15: acquire_memory: allocated here
gzip-1.14/gzip.c:1940:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1942:9: branch_false: ...to here
gzip-1.14/gzip.c:1944:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1944:8: branch_false: ...to here
gzip-1.14/gzip.c:1947:27: branch_true: following 'true' branch...
gzip-1.14/gzip.c:1948:22: branch_true: ...to here
gzip-1.14/gzip.c:1950:12: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1952:12: branch_true: following 'true' branch...
gzip-1.14/gzip.c:1953:13: call_function: inlined call to 'strcpy' from 'treat_dir'
gzip-1.14/gzip.c:1957:13: call_function: calling 'treat_file' from 'treat_dir'
# 1470|               imagic1 = 0; /* avoid lint warning */
# 1471|           } else {
# 1472|->             imagic1 = try_byte ();
# 1473|               magic[1] = imagic1;
# 1474|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
gzip-1.14/gzip.c:1939:15: warning[-Wanalyzer-malloc-leak]: leak of 'fdopendir(fd)'
gzip-1.14/gzip.c:1931:12: acquire_memory: allocated here
gzip-1.14/gzip.c:1933:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1939:15: branch_false: ...to here
gzip-1.14/gzip.c:1939:15: throw: if 'streamsavedir' throws an exception...
gzip-1.14/gzip.c:1939:15: danger: 'fdopendir(fd)' leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
# 1937|       }
# 1938|   
# 1939|->     entries = streamsavedir (dirp, SAVEDIR_SORT_NONE);
# 1940|       if (! entries)
# 1941|         progerror (dir);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
gzip-1.14/gzip.c:1942:9: warning[-Wanalyzer-malloc-leak]: leak of 'streamsavedir(fdopendir(fd), 0)'
gzip-1.14/gzip.c:1933:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1939:15: branch_false: ...to here
gzip-1.14/gzip.c:1939:15: acquire_memory: allocated here
gzip-1.14/gzip.c:1940:8: branch_false: following 'false' branch...
gzip-1.14/gzip.c:1942:9: branch_false: ...to here
gzip-1.14/gzip.c:1942:9: throw: if 'closedir' throws an exception...
gzip-1.14/gzip.c:1942:9: danger: 'streamsavedir(fdopendir(fd), 0)' leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 1940|       if (! entries)
# 1941|         progerror (dir);
# 1942|->     if (closedir (dirp) != 0)
# 1943|         progerror (dir);
# 1944|       if (! entries)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def28]
gzip-1.14/lib/asnprintf.c:31:12: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
gzip-1.14/lib/asnprintf.c:30:3: acquire_resource: 'va_start' called here
gzip-1.14/lib/asnprintf.c:31:12: throw: if 'vasnprintf' throws an exception...
gzip-1.14/lib/asnprintf.c:31:12: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   29|   
#   30|     va_start (args, format);
#   31|->   result = vasnprintf (resultbuf, lengthp, format, args);
#   32|     va_end (args);
#   33|     return result;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def29]
gzip-1.14/lib/creat-safer.c:30:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'creat(file,  mode)'
gzip-1.14/lib/creat-safer.c:30:10: acquire_resource: opened here
gzip-1.14/lib/creat-safer.c:30:10: danger: 'creat(file,  mode)' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   28|   creat_safer (char const *file, mode_t mode)
#   29|   {
#   30|->   return fd_safer (creat (file, mode));
#   31|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def30]
gzip-1.14/lib/fcntl.c:328:22: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
gzip-1.14/lib/fcntl.c:210:3: acquire_resource: 'va_start' called here
gzip-1.14/lib/fcntl.c:328:22: throw: if 'fcntl' throws an exception...
gzip-1.14/lib/fcntl.c:328:22: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  326|             #endif
#  327|               /* These actions take no argument.  */
#  328|->             result = fcntl (fd, action);
#  329|               break;
#  330|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def31]
gzip-1.14/lib/fcntl.c:424:24: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
gzip-1.14/lib/fcntl.c:210:3: acquire_resource: 'va_start' called here
gzip-1.14/lib/fcntl.c:424:24: throw: if 'fcntl' throws an exception...
gzip-1.14/lib/fcntl.c:424:24: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  422|               {
#  423|                 int x = va_arg (arg, int);
#  424|->               result = fcntl (fd, action, x);
#  425|               }
#  426|               break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def32]
gzip-1.14/lib/fcntl.c:432:24: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
gzip-1.14/lib/fcntl.c:210:3: acquire_resource: 'va_start' called here
gzip-1.14/lib/fcntl.c:432:24: throw: if 'fcntl' throws an exception...
gzip-1.14/lib/fcntl.c:432:24: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  430|               {
#  431|                 void *p = va_arg (arg, void *);
#  432|->               result = fcntl (fd, action, p);
#  433|               }
#  434|               break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def33]
gzip-1.14/lib/fcntl.c:482:12: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
gzip-1.14/lib/fcntl.c:202:1: enter_function: entry to 'rpl_fcntl'
gzip-1.14/lib/fcntl.c:210:3: acquire_resource: 'va_start' called here
gzip-1.14/lib/fcntl.c:216:18: call_function: inlined call to 'rpl_fcntl_DUPFD' from 'rpl_fcntl'
#  480|       }
#  481|   #else
#  482|->   result = fcntl (fd, F_DUPFD, target);
#  483|   #endif
#  484|     return result;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def34]
gzip-1.14/lib/fcntl.c:512:16: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
gzip-1.14/lib/fcntl.c:202:1: enter_function: entry to 'rpl_fcntl'
gzip-1.14/lib/fcntl.c:210:3: acquire_resource: 'va_start' called here
gzip-1.14/lib/fcntl.c:223:18: call_function: calling 'rpl_fcntl_DUPFD_CLOEXEC' from 'rpl_fcntl'
#  510|     if (0 <= have_dupfd_cloexec)
#  511|       {
#  512|->       result = fcntl (fd, F_DUPFD_CLOEXEC, target);
#  513|         if (0 <= result || errno != EINVAL)
#  514|           {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def35]
gzip-1.14/lib/fcntl.c:533:19: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
gzip-1.14/lib/fcntl.c:202:1: enter_function: entry to 'rpl_fcntl'
gzip-1.14/lib/fcntl.c:210:3: acquire_resource: 'va_start' called here
gzip-1.14/lib/fcntl.c:223:18: call_function: calling 'rpl_fcntl_DUPFD_CLOEXEC' from 'rpl_fcntl'
#  531|     if (0 <= result && have_dupfd_cloexec == -1)
#  532|       {
#  533|->       int flags = fcntl (result, F_GETFD);
#  534|         if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1)
#  535|           {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def36]
gzip-1.14/lib/fcntl.c:534:24: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
gzip-1.14/lib/fcntl.c:202:1: enter_function: entry to 'rpl_fcntl'
gzip-1.14/lib/fcntl.c:210:3: acquire_resource: 'va_start' called here
gzip-1.14/lib/fcntl.c:223:18: call_function: calling 'rpl_fcntl_DUPFD_CLOEXEC' from 'rpl_fcntl'
#  532|       {
#  533|         int flags = fcntl (result, F_GETFD);
#  534|->       if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1)
#  535|           {
#  536|             int saved_errno = errno;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def37]
gzip-1.14/lib/fcntl.c:537:11: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
gzip-1.14/lib/fcntl.c:202:1: enter_function: entry to 'rpl_fcntl'
gzip-1.14/lib/fcntl.c:210:3: acquire_resource: 'va_start' called here
gzip-1.14/lib/fcntl.c:223:18: call_function: calling 'rpl_fcntl_DUPFD_CLOEXEC' from 'rpl_fcntl'
#  535|           {
#  536|             int saved_errno = errno;
#  537|->           close (result);
#  538|             errno = saved_errno;
#  539|             result = -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
gzip-1.14/util.c:321:23: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(env_val)'
gzip-1.14/util.c:317:8: branch_false: following 'false' branch (when 'env_val' is non-NULL)...
gzip-1.14/util.c:319:15: branch_false: ...to here
gzip-1.14/util.c:321:23: branch_true: following 'true' branch...
gzip-1.14/util.c:322:14: branch_true: ...to here
gzip-1.14/util.c:323:12: branch_false: following 'false' branch...
gzip-1.14/util.c:325:14: branch_false: ...to here
gzip-1.14/util.c:328:8: branch_false: following 'false' branch (when 'nargc != 0')...
gzip-1.14/util.c:332:14: branch_false: ...to here
gzip-1.14/util.c:336:13: throw: if 'xcalloc' throws an exception...
gzip-1.14/util.c:321:23: danger: 'xstrdup(env_val)' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  319|       env_val = xstrdup (env_val);
#  320|   
#  321|->     for (p = env_val; *p; nargc++ ) {        /* move through env_val */
#  322|           p += strspn(p, SEPARATOR);	     /* skip leading separators */
#  323|           if (*p == '\0') break;

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-81.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namegzip-1.14-1.fc44
store-results-to/tmp/tmpkofnhjp5/gzip-1.14-1.fc44.tar.xz
time-created2026-01-08 16:59:04
time-finished2026-01-08 17:00:55
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpkofnhjp5/gzip-1.14-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpkofnhjp5/gzip-1.14-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9