|
| 1 | +Error: SHELLCHECK_WARNING (CWE-398): |
| 2 | +/usr/bin/gpgrt-config:44:25: error[SC2066]: Since you double quoted this, it will not word split, and the loop will only run once. |
| 3 | +# 42| # variant of get_attr for list (separated by ',') |
| 4 | +# 43| get_attr_l () { |
| 5 | +# 44|-> (IFS=', '; for x in "$(get_attr $1)"; do echo $x; done) |
| 6 | +# 45| } |
| 7 | +# 46| |
| 8 | + |
| 9 | +Error: SHELLCHECK_WARNING (CWE-569): |
| 10 | +/usr/bin/gpgrt-config:120:3: warning[SC2221]: This pattern always overrides a later one on line 131. |
| 11 | +# 118| if [ -n "$_reading_attrs" ]; then |
| 12 | +# 119| case "$_line" in |
| 13 | +# 120|-> *:\ *) |
| 14 | +# 121| _key="${_line%%:\ *}" |
| 15 | +# 122| _value="${_line#*:\ }" |
| 16 | + |
| 17 | +Error: SHELLCHECK_WARNING (CWE-569): |
| 18 | +/usr/bin/gpgrt-config:131:6: warning[SC2222]: This pattern never matches because of a previous pattern on line 120. |
| 19 | +# 129| EOF2 |
| 20 | +# 130| ;; |
| 21 | +# 131|-> *:|*:\ ) ;; |
| 22 | +# 132| *) |
| 23 | +# 133| echo "Error reading $_filename: $_line" 1>&2 |
| 24 | + |
| 25 | +Error: SHELLCHECK_WARNING (CWE-563): |
| 26 | +/usr/bin/gpgrt-config:564:6: warning[SC2034]: delimiter appears unused. Verify use (or export if used externally). |
| 27 | +# 562| --modversion) |
| 28 | +# 563| want_attr=Version |
| 29 | +# 564|-> delimiter=" |
| 30 | +# 565| " |
| 31 | +# 566| ;; |
| 32 | + |
| 33 | +Error: CPPCHECK_WARNING (CWE-664): |
| 34 | +libgpg-error-1.41/src/logging.c:1277: error[va_list_usedBeforeStarted]: va_list 'dummy_argptr' used before va_start() was called. |
| 35 | +# 1275| static va_list dummy_argptr; |
| 36 | +# 1276| |
| 37 | +# 1277|-> _gpgrt_logv_printhex (buffer, length, NULL, dummy_argptr); |
| 38 | +# 1278| } |
| 39 | +# 1279| } |
| 40 | + |
| 41 | +Error: RESOURCE_LEAK (CWE-772): |
| 42 | +libgpg-error-1.41/src/mkheader.c:196: alloc_fn: Storage is returned from allocation function "fopen". |
| 43 | +libgpg-error-1.41/src/mkheader.c:196: var_assign: Assigning: "fp" = storage returned from "fopen(fname, "r")". |
| 44 | +libgpg-error-1.41/src/mkheader.c:204: noescape: Resource "fp" is not freed or pointed-to in "fgets". [Note: The source code implementation of the function has been overridden by a builtin model.] |
| 45 | +libgpg-error-1.41/src/mkheader.c:243: noescape: Resource "fp" is not freed or pointed-to in "ferror". |
| 46 | +libgpg-error-1.41/src/mkheader.c:247: leaked_storage: Variable "fp" going out of scope leaks the storage it points to. |
| 47 | +# 245| fprintf (stderr, "%s:%d: error reading file: %s\n", |
| 48 | +# 246| fname, lnr, strerror (errno)); |
| 49 | +# 247|-> return 1; |
| 50 | +# 248| } |
| 51 | +# 249| |
| 52 | + |
| 53 | +Error: RESOURCE_LEAK (CWE-772): |
| 54 | +libgpg-error-1.41/src/spawn-posix.c:697: alloc_fn: Storage is returned from allocation function "_gpgrt_malloc". |
| 55 | +libgpg-error-1.41/src/spawn-posix.c:697: var_assign: Assigning: "r_exitcodes" = storage returned from "_gpgrt_malloc(4UL * count)". |
| 56 | +libgpg-error-1.41/src/spawn-posix.c:697: var_assign: Assigning: "dummy" = "r_exitcodes". |
| 57 | +libgpg-error-1.41/src/spawn-posix.c:707: leaked_storage: Variable "dummy" going out of scope leaks the storage it points to. |
| 58 | +libgpg-error-1.41/src/spawn-posix.c:707: leaked_storage: Returning without freeing "r_exitcodes" leaks the storage that it points to. |
| 59 | +# 705| |
| 60 | +# 706| if (pids[i] == (pid_t)(-1)) |
| 61 | +# 707|-> return GPG_ERR_INV_VALUE; |
| 62 | +# 708| |
| 63 | +# 709| /* See if there was a previously stored result for this pid. */ |
| 64 | + |
| 65 | +Error: RESOURCE_LEAK (CWE-772): |
| 66 | +libgpg-error-1.41/tests/t-b64.c:100: alloc_fn: Storage is returned from allocation function "gpgrt_b64enc_start". |
| 67 | +libgpg-error-1.41/tests/t-b64.c:100: var_assign: Assigning: "state" = storage returned from "gpgrt_b64enc_start(fp, title)". |
| 68 | +libgpg-error-1.41/tests/t-b64.c:108: noescape: Resource "state" is not freed or pointed-to in "gpgrt_b64enc_write". |
| 69 | +libgpg-error-1.41/tests/t-b64.c:112: leaked_storage: Variable "state" going out of scope leaks the storage it points to. |
| 70 | +# 110| { |
| 71 | +# 111| fail ("gpgrt_b64enc_write failed: %s\n", gpg_strerror (err)); |
| 72 | +# 112|-> return err; |
| 73 | +# 113| } |
| 74 | +# 114| |
| 75 | + |
| 76 | +Error: RESOURCE_LEAK (CWE-772): |
| 77 | +libgpg-error-1.41/tests/t-b64.c:151: alloc_fn: Storage is returned from allocation function "malloc". |
| 78 | +libgpg-error-1.41/tests/t-b64.c:151: var_assign: Assigning: "buffer" = storage returned from "malloc(strlen(string) + 1UL)". |
| 79 | +libgpg-error-1.41/tests/t-b64.c:157: noescape: Resource "buffer" is not freed or pointed-to in "strcpy". [Note: The source code implementation of the function has been overridden by a builtin model.] |
| 80 | +libgpg-error-1.41/tests/t-b64.c:168: noescape: Resource "buffer" is not freed or pointed-to in "gpgrt_b64dec_proc". |
| 81 | +libgpg-error-1.41/tests/t-b64.c:194: leaked_storage: Variable "buffer" going out of scope leaks the storage it points to. |
| 82 | +# 192| strlen (expected)); |
| 83 | +# 193| } |
| 84 | +# 194|-> return GPG_ERR_FALSE; |
| 85 | +# 195| } |
| 86 | +# 196| |
| 87 | + |
| 88 | +Error: CPPCHECK_WARNING (CWE-404): |
| 89 | +libgpg-error-1.41/tests/t-syserror.c:53: error[resourceLeak]: Resource leak: fp |
| 90 | +# 51| { |
| 91 | +# 52| fprintf (stderr, "unable to run test\n"); |
| 92 | +# 53|-> return 1; |
| 93 | +# 54| } |
| 94 | +# 55| save_errno = errno; |
0 commit comments