Error: BAD_ALLOC_STRLEN (CWE-131): /builddir/build/BUILD/bash-4.2/subst.c:7089: bad_alloc_strlen: Using "strlen(name + 1)" instead of "strlen(name) + 1" as an argument to "xmalloc"might be an under-allocation. /builddir/build/BUILD/bash-4.2/subst.c:7121: bad_alloc_strlen: Using "strlen(name + 1)" instead of "strlen(name) + 1" as an argument to "xmalloc"might be an under-allocation. Error: BAD_FREE (CWE-590): /builddir/build/BUILD/bash-4.2/lib/readline/bind.c:416: fnptr_free: "xfree" frees function pointer "(map + ic).function". /builddir/build/BUILD/bash-4.2/lib/readline/xfree.c:49: freed_arg: "free" frees parameter "string". Error: BAD_FREE (CWE-590): /builddir/build/BUILD/bash-4.2/lib/readline/keymaps.c:145: fnptr_free: "xfree" frees function pointer "(map + i).function". /builddir/build/BUILD/bash-4.2/lib/readline/xfree.c:49: freed_arg: "free" frees parameter "string". /builddir/build/BUILD/bash-4.2/lib/readline/keymaps.c:149: fnptr_free: "xfree" frees function pointer "(map + i).function". Error: CHECKED_RETURN (CWE-252): /builddir/build/BUILD/bash-4.2/trap.c:1065: check_return: Calling function "run_debug_trap" without checking return value (as is done elsewhere 8 out of 9 times). /builddir/build/BUILD/bash-4.2/execute_cmd.c:2476: example_assign: Assigning: "retval" = return value from "run_debug_trap()". /builddir/build/BUILD/bash-4.2/execute_cmd.c:2480: example_checked: "retval" has its value checked in "retval != 0". /builddir/build/BUILD/bash-4.2/execute_cmd.c:2584: example_assign: Assigning: "r" = return value from "run_debug_trap()". /builddir/build/BUILD/bash-4.2/execute_cmd.c:2588: example_checked: "r" has its value checked in "r == 0". /builddir/build/BUILD/bash-4.2/execute_cmd.c:2923: example_assign: Assigning: "retval" = return value from "run_debug_trap()". /builddir/build/BUILD/bash-4.2/execute_cmd.c:2927: example_checked: "retval" has its value checked in "retval != 0". /builddir/build/BUILD/bash-4.2/execute_cmd.c:3059: example_assign: Assigning: "retval" = return value from "run_debug_trap()". /builddir/build/BUILD/bash-4.2/execute_cmd.c:3063: example_checked: "retval" has its value checked in "retval != 0". /builddir/build/BUILD/bash-4.2/execute_cmd.c:3281: example_assign: Assigning: "retval" = return value from "run_debug_trap()". /builddir/build/BUILD/bash-4.2/execute_cmd.c:3285: example_checked: "retval" has its value checked in "retval != 0". /builddir/build/BUILD/bash-4.2/trap.c:1065: unchecked_value: No check of the return value of "run_debug_trap()". Error: CHECKED_RETURN (CWE-252): /builddir/build/BUILD/bash-4.2/redir.c:903: check_return: Calling function "add_undo_redirect" without checking return value (as is done elsewhere 4 out of 5 times). /builddir/build/BUILD/bash-4.2/redir.c:826: example_assign: Assigning: "r" = return value from "add_undo_redirect(redirector, ri, -1)". /builddir/build/BUILD/bash-4.2/redir.c:829: example_checked: "r" has its value checked in "r < 0". /builddir/build/BUILD/bash-4.2/redir.c:940: example_assign: Assigning: "r" = return value from "add_undo_redirect(redirector, ri, -1)". /builddir/build/BUILD/bash-4.2/redir.c:943: example_checked: "r" has its value checked in "r < 0". /builddir/build/BUILD/bash-4.2/redir.c:1003: example_assign: Assigning: "r" = return value from "add_undo_redirect(redirector, ri, redir_fd)". /builddir/build/BUILD/bash-4.2/redir.c:1006: example_checked: "r" has its value checked in "r < 0". /builddir/build/BUILD/bash-4.2/redir.c:1083: example_assign: Assigning: "r" = return value from "add_undo_redirect(redirector, ri, -1)". /builddir/build/BUILD/bash-4.2/redir.c:1084: example_checked: "r" has its value checked in "r < 0". /builddir/build/BUILD/bash-4.2/redir.c:903: unchecked_value: No check of the return value of "add_undo_redirect(2, ri, -1)". Error: CHECKED_RETURN (CWE-252): /builddir/build/BUILD/bash-4.2/findcmd.c:572: check_return: Calling function "stat" without checking return value (as is done elsewhere 21 out of 25 times). /builddir/build/BUILD/bash-4.2/builtins/mkbuiltins.c:499: example_checked: "stat(filename, &finfo)" has its value checked in "stat(filename, &finfo) == -1". /builddir/build/BUILD/bash-4.2/general.c:416: example_checked: "stat(path1, &st1)" has its value checked in "stat(path1, &st1) != 0". /builddir/build/BUILD/bash-4.2/general.c:423: example_checked: "stat(path2, &st2)" has its value checked in "stat(path2, &st2) != 0". /builddir/build/BUILD/bash-4.2/general.c:543: example_checked: "stat(fn, &sb)" has its value checked in "stat(fn, &sb) == 0". /builddir/build/BUILD/bash-4.2/general.c:552: example_checked: "stat(fn, &sb)" has its value checked in "stat(fn, &sb) == 0". /builddir/build/BUILD/bash-4.2/findcmd.c:572: unchecked_value: No check of the return value of "stat(".", &dotinfo)". Error: CHECKED_RETURN (CWE-252): /builddir/build/BUILD/bash-4.2/lib/readline/complete.c:1186: check_return: Calling function "mbrtowc" without checking return value (as is done elsewhere 13 out of 15 times). /builddir/build/BUILD/bash-4.2/lib/readline/complete.c:670: example_assign: Assigning: "clen" = return value from "mbrtowc(&wc, string + pos, left - pos, &ps)". /builddir/build/BUILD/bash-4.2/lib/readline/complete.c:671: example_checked: "clen" has its value checked in "clen == 18446744073709551615UL". /builddir/build/BUILD/bash-4.2/lib/readline/complete.c:758: example_assign: Assigning: "tlen" = return value from "mbrtowc(&wc, s, end - s, &ps)". /builddir/build/BUILD/bash-4.2/lib/readline/complete.c:759: example_checked: "tlen" has its value checked in "tlen == 18446744073709551615UL". /builddir/build/BUILD/bash-4.2/lib/readline/display.c:1309: example_assign: Assigning: "ret" = return value from "mbrtowc(&wc, new, __ctype_get_mb_cur_max(), &ps)". /builddir/build/BUILD/bash-4.2/lib/readline/display.c:1310: example_checked: "ret" has its value checked in "ret == 18446744073709551615UL". /builddir/build/BUILD/bash-4.2/lib/readline/display.c:1329: example_assign: Assigning: "ret" = return value from "mbrtowc(&wc, old, __ctype_get_mb_cur_max(), &ps)". /builddir/build/BUILD/bash-4.2/lib/readline/display.c:1330: example_checked: "ret" has its value checked in "ret != 0UL". /builddir/build/BUILD/bash-4.2/lib/readline/display.c:2657: example_assign: Assigning: "tmp" = return value from "mbrtowc(&wc, str + point, max, &ps)". /builddir/build/BUILD/bash-4.2/lib/readline/display.c:2658: example_checked: "tmp" has its value checked in "(size_t)tmp == 18446744073709551615UL". /builddir/build/BUILD/bash-4.2/lib/readline/complete.c:1186: unchecked_value: No check of the return value of "mbrtowc(&wc2, match_list[i + 1] + si, strlen(match_list[i + 1] + si), &ps2)". Error: CHECKED_RETURN (CWE-252): /builddir/build/BUILD/bash-4.2/findcmd.c:401: check_return: Calling function "stat" without checking return value (as is done elsewhere 21 out of 25 times). /builddir/build/BUILD/bash-4.2/builtins/mkbuiltins.c:499: example_checked: "stat(filename, &finfo)" has its value checked in "stat(filename, &finfo) == -1". /builddir/build/BUILD/bash-4.2/general.c:416: example_checked: "stat(path1, &st1)" has its value checked in "stat(path1, &st1) != 0". /builddir/build/BUILD/bash-4.2/general.c:423: example_checked: "stat(path2, &st2)" has its value checked in "stat(path2, &st2) != 0". /builddir/build/BUILD/bash-4.2/general.c:543: example_checked: "stat(fn, &sb)" has its value checked in "stat(fn, &sb) == 0". /builddir/build/BUILD/bash-4.2/general.c:552: example_checked: "stat(fn, &sb)" has its value checked in "stat(fn, &sb) == 0". /builddir/build/BUILD/bash-4.2/findcmd.c:401: unchecked_value: No check of the return value of "stat(".", &dotinfo)". Error: DEADCODE (CWE-561): /builddir/build/BUILD/bash-4.2/subst.c:6454: dead_error_condition: On this path, the condition "rxpand" cannot be true. /builddir/build/BUILD/bash-4.2/subst.c:6415: const: After this line, the value of "rxpand" is equal to 0. /builddir/build/BUILD/bash-4.2/subst.c:6454: const: After this line, the value of "rxpand" is equal to 0. /builddir/build/BUILD/bash-4.2/subst.c:6415: assignment: Assigning: "rxpand" = "0". /builddir/build/BUILD/bash-4.2/subst.c:6454: new_values: Noticing condition "rxpand". /builddir/build/BUILD/bash-4.2/subst.c:6456: dead_error_begin: Execution cannot reach this statement "int x;". Error: DEADCODE (CWE-561): /builddir/build/BUILD/bash-4.2/variables.c:3597: dead_error_condition: On this path, the condition "(equal_offset + 1 == 0) ? 1 : (assign[0] == export_env[i][0] && strncmp(assign, export_env[i], equal_offset + 1) == 0)" cannot be false. /builddir/build/BUILD/bash-4.2/variables.c:3595: const: After this line, the value of "i" is equal to 0. /builddir/build/BUILD/bash-4.2/variables.c:3595: assignment: Assigning: "i" = "0". /builddir/build/BUILD/bash-4.2/variables.c:3595: dead_error_line: Execution cannot reach this statement "i++;". Error: DEADCODE (CWE-561): /builddir/build/BUILD/bash-4.2/subst.c:1892: dead_error_condition: On this path, the condition "(olen == 0) ? 1 : (string + i[0] == openstr[0] && strncmp(string + i, openstr, olen) == 0)" cannot be false. /builddir/build/BUILD/bash-4.2/subst.c:1875: const: After this line, the value of "i" is equal to 0. /builddir/build/BUILD/bash-4.2/subst.c:1895: const: After this line, the value of "i" is equal to 0. /builddir/build/BUILD/bash-4.2/subst.c:1892: const: After this line, the value of "olen" is equal to 0. /builddir/build/BUILD/bash-4.2/subst.c:1895: assignment: Assigning: "i" = "i + olen". /builddir/build/BUILD/bash-4.2/subst.c:1875: assignment: Assigning: "i" = "openc = 0". /builddir/build/BUILD/bash-4.2/subst.c:1875: assignment: Assigning: "openc" = "0". /builddir/build/BUILD/bash-4.2/subst.c:1892: new_values: Noticing condition "olen == 0". /builddir/build/BUILD/bash-4.2/subst.c:1897: dead_error_line: Execution cannot reach this statement "if (string[i] == 39 || stri...". Error: DEADCODE (CWE-561): /builddir/build/BUILD/bash-4.2/bashline.c:794: dead_error_condition: On this path, the condition "((len == 0) ? 1 : (text[0] == hostname_list[i][0] && strncmp(text, hostname_list[i], len) == 0)) == 0" cannot be true. /builddir/build/BUILD/bash-4.2/bashline.c:792: const: After this line, the value of "i" is equal to 0. /builddir/build/BUILD/bash-4.2/bashline.c:794: const: After this line, the value of "len" is equal to 0. /builddir/build/BUILD/bash-4.2/bashline.c:792: assignment: Assigning: "i" = "rsize = 0". /builddir/build/BUILD/bash-4.2/bashline.c:792: assignment: Assigning: "rsize" = "0". /builddir/build/BUILD/bash-4.2/bashline.c:794: new_values: Noticing condition "len == 0". /builddir/build/BUILD/bash-4.2/bashline.c:795: dead_error_line: Execution cannot reach this statement "continue;". Error: DEADCODE (CWE-561): /builddir/build/BUILD/bash-4.2/builtins/fc.def:545: dead_error_condition: On this path, the condition "j >= 0" cannot be false. /builddir/build/BUILD/bash-4.2/builtins/fc.def:545: at_least: After this line, the value of "j" is at least 0. /builddir/build/BUILD/bash-4.2/builtins/fc.def:506: assignment: Assigning: "i" = "last_hist". /builddir/build/BUILD/bash-4.2/builtins/fc.def:545: assignment: Assigning: "j" = "i". /builddir/build/BUILD/bash-4.2/builtins/fc.def:550: dead_error_line: Execution cannot reach this statement "return -1;". Error: DEADCODE (CWE-561): /builddir/build/BUILD/bash-4.2/builtins/fc.def:547: dead_error_condition: On this path, the condition "(clen == 0) ? 1 : (command[0] == hlist[j]->line[0] && strncmp(command, hlist[j]->line, clen) == 0)" cannot be false. /builddir/build/BUILD/bash-4.2/builtins/fc.def:545: at_least: After this line, the value of "j" is at least 0. /builddir/build/BUILD/bash-4.2/builtins/fc.def:547: const: After this line, the value of "clen" is equal to 0. /builddir/build/BUILD/bash-4.2/builtins/fc.def:506: assignment: Assigning: "i" = "last_hist". /builddir/build/BUILD/bash-4.2/builtins/fc.def:545: assignment: Assigning: "j" = "i". /builddir/build/BUILD/bash-4.2/builtins/fc.def:547: new_values: Noticing condition "clen == 0". /builddir/build/BUILD/bash-4.2/builtins/fc.def:545: new_values: Noticing condition "j >= 0". /builddir/build/BUILD/bash-4.2/builtins/fc.def:545: dead_error_line: Execution cannot reach this statement "j--;". Error: DEADCODE (CWE-561): /builddir/build/BUILD/bash-4.2/builtins/ulimit.def:728: dead_error_condition: On this path, the condition "curlim == 18446744073709551615UL" cannot be true. /builddir/build/BUILD/bash-4.2/builtins/ulimit.def:726: cannot_single: After this line (or expression), the value of "curlim" cannot be -1. /builddir/build/BUILD/bash-4.2/builtins/ulimit.def:729: dead_error_line: Execution cannot reach this statement "puts("hard");". Error: DEADCODE (CWE-561): /builddir/build/BUILD/bash-4.2/builtins/ulimit.def:730: dead_error_condition: On this path, the condition "curlim == 18446744073709551615UL" cannot be true. /builddir/build/BUILD/bash-4.2/builtins/ulimit.def:728: cannot_single: After this line (or expression), the value of "curlim" cannot be -1. /builddir/build/BUILD/bash-4.2/builtins/ulimit.def:731: dead_error_line: Execution cannot reach this statement "puts("soft");". Error: DEADCODE (CWE-561): /builddir/build/BUILD/bash-4.2/lib/readline/histsearch.c:127: dead_error_condition: On this path, the condition "(string_len == 0) ? 1 : (string[0] == line + line_index[0] && strncmp(string, line + line_index, string_len) == 0)" cannot be false. /builddir/build/BUILD/bash-4.2/lib/readline/histsearch.c:125: at_least: After this line, the value of "line_index" is at least 0. /builddir/build/BUILD/bash-4.2/lib/readline/histsearch.c:127: const: After this line, the value of "string_len" is equal to 0. /builddir/build/BUILD/bash-4.2/lib/readline/histsearch.c:125: new_values: Noticing condition "line_index >= 0". /builddir/build/BUILD/bash-4.2/lib/readline/histsearch.c:127: new_values: Noticing condition "string_len == 0". /builddir/build/BUILD/bash-4.2/lib/readline/histsearch.c:132: dead_error_line: Execution cannot reach this statement "line_index--;". Error: DEADCODE (CWE-561): /builddir/build/BUILD/bash-4.2/lib/readline/histsearch.c:144: dead_error_condition: On this path, the condition "(string_len == 0) ? 1 : (string[0] == line + line_index[0] && strncmp(string, line + line_index, string_len) == 0)" cannot be false. /builddir/build/BUILD/bash-4.2/lib/readline/histsearch.c:140: const: After this line, the value of "line_index" is equal to 0. /builddir/build/BUILD/bash-4.2/lib/readline/histsearch.c:144: const: After this line, the value of "string_len" is equal to 0. /builddir/build/BUILD/bash-4.2/lib/readline/histsearch.c:140: assignment: Assigning: "line_index" = "0". /builddir/build/BUILD/bash-4.2/lib/readline/histsearch.c:144: new_values: Noticing condition "string_len == 0". /builddir/build/BUILD/bash-4.2/lib/readline/histsearch.c:149: dead_error_line: Execution cannot reach this statement "line_index++;". Error: DEADCODE (CWE-561): /builddir/build/BUILD/bash-4.2/lib/readline/text.c:1230: dead_error_condition: On this path, the condition "(rl_comment_len == 0) ? 1 : (rl_comment_text[0] == rl_line_buffer[0] && strncmp(rl_comment_text, rl_line_buffer, rl_comment_len) == 0)" cannot be false. /builddir/build/BUILD/bash-4.2/lib/readline/text.c:1230: const: After this line, the value of "rl_comment_len" is equal to 0. /builddir/build/BUILD/bash-4.2/lib/readline/text.c:1230: new_values: Noticing condition "rl_comment_len == 0". /builddir/build/BUILD/bash-4.2/lib/readline/text.c:1233: dead_error_line: Execution cannot reach this statement "rl_insert_text(rl_comment_t...". Error: DEADCODE (CWE-561): /builddir/build/BUILD/bash-4.2/subst.c:606: dead_error_condition: On this path, the condition "(sublen == 0) ? 1 : (string + sindex[0] == substr[0] && strncmp(string + sindex, substr, sublen) == 0)" cannot be false. /builddir/build/BUILD/bash-4.2/subst.c:604: const: After this line, the value of "sindex" is equal to 0. /builddir/build/BUILD/bash-4.2/subst.c:606: const: After this line, the value of "sublen" is equal to 0. /builddir/build/BUILD/bash-4.2/subst.c:604: assignment: Assigning: "sindex" = "0". /builddir/build/BUILD/bash-4.2/subst.c:606: new_values: Noticing condition "sublen == 0". /builddir/build/BUILD/bash-4.2/subst.c:609: dead_error_line: Execution cannot reach this statement "switch (c){ case 92: si...". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/braces.c:418: var_compare_op: Comparing "ep" to null implies that "ep" might be null. /builddir/build/BUILD/bash-4.2/braces.c:420: var_deref_op: Dereferencing null variable "ep". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/arrayfunc.c:428: assign_zero: Assigning: "akey" = 0. /builddir/build/BUILD/bash-4.2/arrayfunc.c:529: var_deref_model: Passing null variable "akey" to function "bind_array_var_internal", which dereferences it. /builddir/build/BUILD/bash-4.2/arrayfunc.c:138: deref_parm_in_call: Function "assoc_reference" dereferences parameter "key". /builddir/build/BUILD/bash-4.2/assoc.c:111: deref_parm_in_call: Function "hash_search" dereferences parameter "string". /builddir/build/BUILD/bash-4.2/hashlib.c:178: deref_parm_in_call: Function "hash_string" dereferences parameter "string". /builddir/build/BUILD/bash-4.2/hashlib.c:141: deref_parm: Directly dereferencing parameter "s". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:449: var_compare_op: Comparing "pat" to null implies that "pat" might be null. /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:473: var_deref_model: Passing null variable "pat" to function "strlen", which dereferences it. (The dereference is assumed on the basis of the 'nonnull' parameter attribute.) Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/subst.c:870: var_compare_op: Comparing "ret" to null implies that "ret" might be null. /builddir/build/BUILD/bash-4.2/subst.c:876: var_deref_op: Dereferencing null variable "ret". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/subst.c:6590: var_compare_op: Comparing "patsub" to null implies that "patsub" might be null. /builddir/build/BUILD/bash-4.2/subst.c:6598: var_deref_model: Passing null variable "patsub" to function "strlen", which dereferences it. (The dereference is assumed on the basis of the 'nonnull' parameter attribute.) Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/execute_cmd.c:3338: var_compare_op: Comparing "cond->right" to null implies that "cond->right" might be null. /builddir/build/BUILD/bash-4.2/execute_cmd.c:3391: var_deref_op: Dereferencing null variable "cond->right". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/execute_cmd.c:3336: var_compare_op: Comparing "cond->left" to null implies that "cond->left" might be null. /builddir/build/BUILD/bash-4.2/execute_cmd.c:3360: var_deref_op: Dereferencing null variable "cond->left". /builddir/build/BUILD/bash-4.2/execute_cmd.c:3384: var_deref_op: Dereferencing null variable "cond->left". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/execute_cmd.c:2196: var_compare_op: Comparing "cmd" to null implies that "cmd" might be null. /builddir/build/BUILD/bash-4.2/execute_cmd.c:2218: var_deref_op: Dereferencing null variable "cmd". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/execute_cmd.c:2742: var_compare_op: Comparing "l" to null implies that "l" might be null. /builddir/build/BUILD/bash-4.2/execute_cmd.c:2744: var_deref_op: Dereferencing null variable "l". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/builtins/read.def:727: var_compare_op: Comparing "t" to null implies that "t" might be null. /builddir/build/BUILD/bash-4.2/builtins/read.def:734: var_deref_model: Passing null variable "t" to function "bind_read_variable", which dereferences it. /builddir/build/BUILD/bash-4.2/builtins/read.def:820: deref_parm_in_call: Function "assign_array_element" dereferences parameter "value". /builddir/build/BUILD/bash-4.2/arrayfunc.c:281: deref_parm_in_call: Function "bind_array_variable" dereferences parameter "value". /builddir/build/BUILD/bash-4.2/arrayfunc.c:199: deref_parm_in_call: Function "bind_array_var_internal" dereferences parameter "value". /builddir/build/BUILD/bash-4.2/arrayfunc.c:152: deref_parm_in_call: Function "make_variable_value" dereferences parameter "value". /builddir/build/BUILD/bash-4.2/variables.c:2148: deref_parm: Directly dereferencing parameter "value". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/execute_cmd.c:2882: var_compare_op: Comparing "l" to null implies that "l" might be null. /builddir/build/BUILD/bash-4.2/execute_cmd.c:2884: var_deref_op: Dereferencing null variable "l". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/execute_cmd.c:4161: var_compare_op: Comparing "tc" to null implies that "tc" might be null. /builddir/build/BUILD/bash-4.2/execute_cmd.c:4259: var_deref_op: Dereferencing null variable "tc". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/execute_cmd.c:729: var_compare_op: Comparing "command->value.Simple" to null implies that "command->value.Simple" might be null. /builddir/build/BUILD/bash-4.2/execute_cmd.c:732: var_deref_op: Dereferencing null variable "command->value.Simple". /builddir/build/BUILD/bash-4.2/execute_cmd.c:734: var_deref_op: Dereferencing null variable "command->value.Simple". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/lib/readline/complete.c:1228: var_compare_op: Comparing "text" to null implies that "text" might be null. /builddir/build/BUILD/bash-4.2/lib/readline/complete.c:1266: var_deref_model: Passing null variable "text" to function "strlen", which dereferences it. (The dereference is assumed on the basis of the 'nonnull' parameter attribute.) Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/pcomplete.c:1150: var_compare_op: Comparing "tw" to null implies that "tw" might be null. /builddir/build/BUILD/bash-4.2/pcomplete.c:1151: var_deref_model: Passing null variable "tw" to function "dispose_word_desc", which dereferences it. /builddir/build/BUILD/bash-4.2/dispose_cmd.c:258: deref_parm: Directly dereferencing parameter "w". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/bashline.c:3435: var_compare_op: Comparing "rtext" to null implies that "rtext" might be null. /builddir/build/BUILD/bash-4.2/bashline.c:3444: var_deref_model: Passing null variable "rtext" to function "strlen", which dereferences it. (The dereference is assumed on the basis of the 'nonnull' parameter attribute.) Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/bashline.c:2630: var_compare_op: Comparing "directory_part" to null implies that "directory_part" might be null. /builddir/build/BUILD/bash-4.2/bashline.c:2634: var_deref_model: Passing null variable "directory_part" to function "bash_tilde_expand", which dereferences it. /builddir/build/BUILD/bash-4.2/general.c:990: deref_parm: Directly dereferencing parameter "s". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/builtins/exec.def:196: assign_zero: Assigning: "env" = 0. /builddir/build/BUILD/bash-4.2/builtins/exec.def:215: var_deref_model: Passing null variable "env" to function "shell_execve", which dereferences it. /builddir/build/BUILD/bash-4.2/execute_cmd.c:4950: deref_parm_in_call: Function "execve" dereferences parameter "env". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/stringlib.c:154: assign_zero: Assigning: "temp" = 0. /builddir/build/BUILD/bash-4.2/stringlib.c:162: var_deref_op: Dereferencing null variable "temp". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/builtins/getopt.c:182: var_compare_op: Comparing "temp" to null implies that "temp" might be null. /builddir/build/BUILD/bash-4.2/builtins/getopt.c:190: var_deref_op: Dereferencing null variable "temp". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/builtins/help.def:204: var_compare_op: Comparing "doc" to null implies that "doc" might be null. /builddir/build/BUILD/bash-4.2/builtins/help.def:213: var_deref_op: Dereferencing null variable "doc". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/builtins/mkbuiltins.c:1398: var_compare_op: Comparing "documentation" to null implies that "documentation" might be null. /builddir/build/BUILD/bash-4.2/builtins/mkbuiltins.c:1410: var_deref_op: Dereferencing null variable "documentation". Error: FORWARD_NULL (CWE-476): /builddir/build/BUILD/bash-4.2/builtins/mkbuiltins.c:1239: var_compare_op: Comparing "builtin->shortdoc" to null implies that "builtin->shortdoc" might be null. /builddir/build/BUILD/bash-4.2/builtins/mkbuiltins.c:1248: var_deref_model: Passing null variable "builtin->shortdoc" to function "save_builtin", which dereferences it. /builddir/build/BUILD/bash-4.2/builtins/mkbuiltins.c:1073: deref_parm_in_call: Function "copy_builtin" dereferences parameter "builtin->shortdoc". /builddir/build/BUILD/bash-4.2/builtins/mkbuiltins.c:1054: deref_parm_in_call: Function "strlen" dereferences parameter "builtin->shortdoc". (The dereference is assumed on the basis of the 'nonnull' parameter attribute.) Error: MISSING_BREAK (CWE-484): /builddir/build/BUILD/bash-4.2/bashline.c:1632: unterminated_case: This case (value 0) is not terminated by a 'break' statement. /builddir/build/BUILD/bash-4.2/bashline.c:1647: fallthrough: The above case falls through to this one. Error: MISSING_BREAK (CWE-484): /builddir/build/BUILD/bash-4.2/bashline.c:1647: unterminated_case: This case (value 1) is not terminated by a 'break' statement. /builddir/build/BUILD/bash-4.2/bashline.c:1662: fallthrough: The above case falls through to this one. Error: MISSING_BREAK (CWE-484): /builddir/build/BUILD/bash-4.2/bashline.c:1662: unterminated_case: This case (value 2) is not terminated by a 'break' statement. /builddir/build/BUILD/bash-4.2/bashline.c:1675: fallthrough: The above case falls through to this one. Error: NEGATIVE_RETURNS (CWE-687): /builddir/build/BUILD/bash-4.2/jobs.c:1738: negative_return_fn: Function "fork()" returns a negative number. /builddir/build/BUILD/bash-4.2/jobs.c:1738: var_assign: Assigning: signed variable "pid" = "fork". /builddir/build/BUILD/bash-4.2/jobs.c:1860: var_assign: Assigning: signed variable "first_pid" = "pid". /builddir/build/BUILD/bash-4.2/jobs.c:1879: negative_returns: "pid" is passed to a parameter that cannot be negative. Error: NEGATIVE_RETURNS (CWE-687): /builddir/build/BUILD/bash-4.2/jobs.c:1738: negative_return_fn: Function "fork()" returns a negative number. /builddir/build/BUILD/bash-4.2/jobs.c:1738: var_assign: Assigning: signed variable "pid" = "fork". /builddir/build/BUILD/bash-4.2/jobs.c:1860: var_assign: Assigning: signed variable "first_pid" = "pid". /builddir/build/BUILD/bash-4.2/jobs.c:1870: var_assign: Assigning: signed variable "pipeline_pgrp" = "pid". /builddir/build/BUILD/bash-4.2/jobs.c:1879: negative_returns: "pid" is passed to a parameter that cannot be negative. Error: NEGATIVE_RETURNS (CWE-687): /builddir/build/BUILD/bash-4.2/jobs.c:3636: negative_return_fn: Function "dup(fileno(stderr))" returns a negative number. /builddir/build/BUILD/bash-4.2/jobs.c:3636: var_assign: Assigning: signed variable "shell_tty" = "dup". /builddir/build/BUILD/bash-4.2/jobs.c:3638: negative_returns: "shell_tty" is passed to a parameter that cannot be negative. /builddir/build/BUILD/bash-4.2/general.c:459: neg_sink_parm_call: Passing "fd" to "dup2", which cannot accept a negative. Error: NEGATIVE_RETURNS (CWE-687): /builddir/build/BUILD/bash-4.2/builtins/ulimit.def:425: negative_return_fn: Function "_findlim(cmd)" returns a negative number. /builddir/build/BUILD/bash-4.2/builtins/ulimit.def:301: return_negative_constant: Explicitly returning negative value "-1". /builddir/build/BUILD/bash-4.2/builtins/ulimit.def:425: var_assign: Assigning: signed variable "limind" = "_findlim". /builddir/build/BUILD/bash-4.2/builtins/ulimit.def:428: negative_returns: Passing variable "limind" to a parameter that cannot be negative. /builddir/build/BUILD/bash-4.2/builtins/ulimit.def:487: index: Indexing with parameter "ind". Error: NEGATIVE_RETURNS (CWE-687): /builddir/build/BUILD/bash-4.2/general.c:399: negative_return_fn: Function "open(tty, 2050)" returns a negative number. /builddir/build/BUILD/bash-4.2/general.c:399: var_assign: Assigning: signed variable "tty_fd" = "open". /builddir/build/BUILD/bash-4.2/general.c:401: negative_returns: "tty_fd" is passed to a parameter that cannot be negative. Error: NO_EFFECT (CWE-665): /builddir/build/BUILD/bash-4.2/general.c:121: unsigned_compare: This less-than-zero comparison of an unsigned value is never true. "n < 0UL". Error: NULL_RETURNS (CWE-476): /builddir/build/BUILD/bash-4.2/builtins/set.def:789: returned_null: Function "strchr" returns null (checked 66 out of 68 times). /builddir/build/BUILD/bash-4.2/support/bashversion.c:126: example_assign: Assigning: "rv" = return value from "strchr(dv, 46)". /builddir/build/BUILD/bash-4.2/support/bashversion.c:127: example_checked: "rv" has its value checked in "rv". /builddir/build/BUILD/bash-4.2/variables.c:889: example_assign: Assigning: "s" = return value from "strchr(d, 46)". /builddir/build/BUILD/bash-4.2/variables.c:890: example_checked: "s" has its value checked in "s". /builddir/build/BUILD/bash-4.2/execute_cmd.c:3606: example_checked: "strchr(w->word->word, 65)" has its value checked in "strchr(w->word->word, 65)". /builddir/build/BUILD/bash-4.2/shell.c:1810: example_assign: Assigning: "s" = return value from "strchr(set_opts, 91)". /builddir/build/BUILD/bash-4.2/shell.c:1811: example_checked: "s" has its value checked in "s == NULL". /builddir/build/BUILD/bash-4.2/shell.c:1815: example_assign: Assigning: "t" = return value from "strchr(s, 93)". /builddir/build/BUILD/bash-4.2/shell.c:1816: example_checked: "t" has its value checked in "t". /builddir/build/BUILD/bash-4.2/builtins/set.def:789: var_assigned: Assigning: "t" = null return value from "strchr". /builddir/build/BUILD/bash-4.2/builtins/set.def:790: dereference: Incrementing a pointer which might be null: "t". Error: OVERRUN_DYNAMIC (CWE-125): /builddir/build/BUILD/bash-4.2/subst.c:2774: buffer_alloc: Calling allocating function "xmalloc" which allocated 1 bytes dictated by parameter 1. /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: buffer_alloc: "malloc" allocates memory determined by parameter "bytes" of the current function. /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = storage allocated by "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_dbuffer: Returning allocated array "temp". /builddir/build/BUILD/bash-4.2/subst.c:2774: var_assign: Assigning: "value" = "xmalloc(1UL)". /builddir/build/BUILD/bash-4.2/subst.c:2800: overrun-dbuffer-val: Overrunning dynamic array "value" of size 1 bytes by passing it as an argument to a function which indexes it at position 2. /builddir/build/BUILD/bash-4.2/arrayfunc.c:281: access_dbuff_const: Calling "bind_array_variable" indexes array "value" at byte position 2. /builddir/build/BUILD/bash-4.2/arrayfunc.c:199: access_dbuff_const: Calling "bind_array_var_internal" indexes array "value" at byte position 2. /builddir/build/BUILD/bash-4.2/arrayfunc.c:152: access_dbuff_const: Calling "make_variable_value" indexes array "value" at byte position 2. /builddir/build/BUILD/bash-4.2/variables.c:2143: index_const: Pointer "value" directly indexed by constant "2". Error: OVERRUN_DYNAMIC (CWE-125): /builddir/build/BUILD/bash-4.2/lib/readline/tilde.c:273: alloc_strlen: Allocating insufficient memory for the terminating null of the string. Error: OVERRUN_DYNAMIC (CWE-125): /builddir/build/BUILD/bash-4.2/subst.c:8456: buffer_alloc: Calling allocating function "xmalloc" which allocated 2 bytes dictated by parameter 1. /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: buffer_alloc: "malloc" allocates memory determined by parameter "bytes" of the current function. /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = storage allocated by "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_dbuffer: Returning allocated array "temp". /builddir/build/BUILD/bash-4.2/subst.c:8456: var_assign: Assigning: "temp" = "xmalloc(mblength + 1UL)". /builddir/build/BUILD/bash-4.2/subst.c:7971: overrun-dbuffer-val: Overrunning dynamic array "temp" of size 2 bytes by passing it as an argument to a function which indexes it at position 2. /builddir/build/BUILD/bash-4.2/subst.c:654: index_const: Pointer "source" directly indexed by constant "2". Error: OVERRUN_DYNAMIC (CWE-125): /builddir/build/BUILD/bash-4.2/subst.c:8367: buffer_alloc: Calling allocating function "quote_string" which allocated 2 bytes. /builddir/build/BUILD/bash-4.2/subst.c:3555: buffer_alloc: "xmalloc" which allocates 2 bytes based on "2UL". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: buffer_alloc: "malloc" allocates memory determined by parameter "bytes" of the current function. /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = storage allocated by "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_dbuffer: Returning allocated array "temp". /builddir/build/BUILD/bash-4.2/subst.c:3555: var_assign: Assigning: "result" = storage allocated by "xmalloc(2UL)". /builddir/build/BUILD/bash-4.2/subst.c:3575: return_dbuffer: Returning allocated array "result". /builddir/build/BUILD/bash-4.2/subst.c:8367: var_assign: Assigning: "temp" = "quote_string(temp)". /builddir/build/BUILD/bash-4.2/subst.c:7971: overrun-dbuffer-val: Overrunning dynamic array "temp" of size 2 bytes by passing it as an argument to a function which indexes it at position 2. /builddir/build/BUILD/bash-4.2/subst.c:654: index_const: Pointer "source" directly indexed by constant "2". Error: OVERRUN_DYNAMIC (CWE-125): /builddir/build/BUILD/bash-4.2/jobs.c:498: buffer_alloc: Calling allocating function "xmalloc" which allocated memory dictated by argument "js.j_jobslots * sizeof (JOB *) /*8*/". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: buffer_alloc: "malloc" allocates memory determined by parameter "bytes" of the current function. /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = storage allocated by "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_dbuffer: Returning allocated array "temp". /builddir/build/BUILD/bash-4.2/jobs.c:498: var_assign: Assigning: "jobs" = "xmalloc(js.j_jobslots * sizeof (JOB *) /*8*/)". /builddir/build/BUILD/bash-4.2/jobs.c:501: symbolic_compare: Tracking "i" since "js.j_jobslots" is tracked with "jobs". /builddir/build/BUILD/bash-4.2/jobs.c:531: symbolic_compare: Tracking "i" since "js.j_jobslots" is tracked with "jobs". /builddir/build/BUILD/bash-4.2/jobs.c:597: overrun-local: Overrunning dynamic array "jobs" at offset corresponding to index variable "i". Error: OVERRUN_DYNAMIC (CWE-125): /builddir/build/BUILD/bash-4.2/builtins/cd.def:264: buffer_alloc: Calling allocating function "extract_colon_unit" which allocated 1 bytes. /builddir/build/BUILD/bash-4.2/general.c:813: buffer_alloc: "xmalloc" which allocates 1 bytes based on "1UL". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: buffer_alloc: "malloc" allocates memory determined by parameter "bytes" of the current function. /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = storage allocated by "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_dbuffer: Returning allocated array "temp". /builddir/build/BUILD/bash-4.2/general.c:813: var_assign: Assigning: "value" = storage allocated by "xmalloc(1UL)". /builddir/build/BUILD/bash-4.2/general.c:819: return_dbuffer: Returning allocated array "value". /builddir/build/BUILD/bash-4.2/builtins/cd.def:264: var_assign: Assigning: "path" = "extract_colon_unit(cdpath, &path_index)". /builddir/build/BUILD/bash-4.2/builtins/cd.def:268: overrun-dbuffer-val: Overrunning dynamic array "path" of size 1 bytes by passing it as an argument to a function which indexes it at position 2. /builddir/build/BUILD/bash-4.2/lib/sh/makepath.c:96: index_const: Pointer "path" directly indexed by constant "2". Error: OVERRUN_DYNAMIC (CWE-125): /builddir/build/BUILD/bash-4.2/builtins/shopt.def:638: buffer_alloc: Calling allocating function "xmalloc" which allocated 1 bytes dictated by parameter 1. /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: buffer_alloc: "malloc" allocates memory determined by parameter "bytes" of the current function. /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = storage allocated by "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_dbuffer: Returning allocated array "temp". /builddir/build/BUILD/bash-4.2/builtins/shopt.def:638: var_assign: Assigning: "value" = "xmalloc(vsize + 1)". /builddir/build/BUILD/bash-4.2/builtins/shopt.def:666: overrun-dbuffer-val: Overrunning dynamic array "value" of size 1 bytes by passing it as an argument to a function which indexes it at position 2. /builddir/build/BUILD/bash-4.2/variables.c:2302: access_dbuff_const: Calling "bind_variable_internal" indexes array "value" at byte position 2. /builddir/build/BUILD/bash-4.2/variables.c:2206: access_dbuff_const: Calling "make_variable_value" indexes array "value" at byte position 2. /builddir/build/BUILD/bash-4.2/variables.c:2143: index_const: Pointer "value" directly indexed by constant "2". Error: OVERRUN_DYNAMIC (CWE-125): /builddir/build/BUILD/bash-4.2/lib/tilde/tilde.c:273: alloc_strlen: Allocating insufficient memory for the terminating null of the string. Error: OVERRUN_DYNAMIC (CWE-125): /builddir/build/BUILD/bash-4.2/variables.c:2537: buffer_alloc: Calling allocating function "xmalloc" which allocated 1 bytes dictated by parameter 1. /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: buffer_alloc: "malloc" allocates memory determined by parameter "bytes" of the current function. /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = storage allocated by "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_dbuffer: Returning allocated array "temp". /builddir/build/BUILD/bash-4.2/variables.c:2537: var_assign: Assigning: "value" = "xmalloc(1UL)". /builddir/build/BUILD/bash-4.2/variables.c:2541: alias: Assigning: "var->value" = "value". /builddir/build/BUILD/bash-4.2/variables.c:2546: overrun-dbuffer-val: Overrunning dynamic array "value" of size 1 bytes by passing it as an argument to a function which indexes it at position 2. /builddir/build/BUILD/bash-4.2/variables.c:3405: index_const: Pointer "value" directly indexed by constant "2". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:49: overrun-buffer-arg: Overrunning static array "lbuf" of size 22 bytes by passing it to a function which indexes it with argument "sizeof (lbuf) /*22*/" at byte position 22. /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/array.c:853: overrun-buffer-arg: Overrunning static array "indstr" of size 22 bytes by passing it to a function which indexes it with argument "sizeof (indstr) /*22*/" at byte position 22. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/variables.c:4688: overrun-buffer-arg: Overrunning static array "tbuf" of size 12 bytes by passing it to a function which indexes it with argument "sizeof (tbuf) /*12*/" at byte position 12. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/variables.c:4714: overrun-buffer-arg: Overrunning static array "tbuf" of size 12 bytes by passing it to a function which indexes it with argument "sizeof (tbuf) /*12*/" at byte position 12. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/variables.c:4724: overrun-buffer-arg: Overrunning static array "tbuf" of size 12 bytes by passing it to a function which indexes it with argument "sizeof (tbuf) /*12*/" at byte position 12. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/print_cmd.c:1470: overrun-buffer-arg: Overrunning static array "intbuf" of size 12 bytes by passing it to a function which indexes it with argument "sizeof (intbuf) /*12*/" at byte position 12. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/subst.c:4937: overrun-buffer-arg: Overrunning static array "intbuf" of size 12 bytes by passing it to a function which indexes it with argument "sizeof (intbuf) /*12*/" at byte position 12. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/variables.c:2404: overrun-buffer-arg: Overrunning static array "ibuf" of size 22 bytes by passing it to a function which indexes it with argument "sizeof (ibuf) /*22*/" at byte position 22. /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/expr.c:328: overrun-buffer-arg: Overrunning static array "ibuf" of size 22 bytes by passing it to a function which indexes it with argument "sizeof (ibuf) /*22*/" at byte position 22. /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/pcomplete.c:901: overrun-buffer-arg: Overrunning static array "ibuf" of size 12 bytes by passing it to a function which indexes it with argument "sizeof (ibuf) /*12*/" at byte position 12. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/pcomplete.c:906: overrun-buffer-arg: Overrunning static array "ibuf" of size 12 bytes by passing it to a function which indexes it with argument "sizeof (ibuf) /*12*/" at byte position 12. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/pcomplete.c:911: overrun-buffer-arg: Overrunning static array "ibuf" of size 12 bytes by passing it to a function which indexes it with argument "sizeof (ibuf) /*12*/" at byte position 12. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/pcomplete.c:922: overrun-buffer-arg: Overrunning static array "ibuf" of size 12 bytes by passing it to a function which indexes it with argument "sizeof (ibuf) /*12*/" at byte position 12. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/bashline.c:3528: overrun-buffer-arg: Overrunning static array "ibuf" of size 12 bytes by passing it to a function which indexes it with argument "sizeof (ibuf) /*12*/" at byte position 12. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/builtins/getopts.def:270: overrun-buffer-val: Overrunning static array "strval" of size 2 bytes by passing it as an argument to a function which indexes it at byte position 2. /builddir/build/BUILD/bash-4.2/variables.c:2302: access_dbuff_const: Calling "bind_variable_internal" indexes array "value" at byte position 2. /builddir/build/BUILD/bash-4.2/variables.c:2206: access_dbuff_const: Calling "make_variable_value" indexes array "value" at byte position 2. /builddir/build/BUILD/bash-4.2/variables.c:2143: index_const: Pointer "value" directly indexed by constant "2". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:70: overrun-buffer-arg: Overrunning static array "lbuf" of size 21 bytes by passing it to a function which indexes it with argument "sizeof (lbuf) /*21*/" at byte position 21. /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/variables.c:894: overrun-buffer-arg: Overrunning static array "b" of size 12 bytes by passing it to a function which indexes it with argument "sizeof (b) /*12*/" at byte position 12. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/variables.c:896: overrun-buffer-arg: Overrunning static array "b" of size 12 bytes by passing it to a function which indexes it with argument "sizeof (b) /*12*/" at byte position 12. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/variables.c:843: overrun-buffer-arg: Overrunning static array "namebuf" of size 12 bytes by passing it to a function which indexes it with argument "sizeof (namebuf) /*12*/" at byte position 12. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/variables.c:857: overrun-buffer-arg: Overrunning static array "buff" of size 11 bytes by passing it to a function which indexes it with argument "sizeof (buff) /*11*/" at byte position 11. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/variables.c:866: overrun-buffer-arg: Overrunning static array "buff" of size 11 bytes by passing it to a function which indexes it with argument "sizeof (buff) /*11*/" at byte position 11. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/variables.c:919: overrun-buffer-arg: Overrunning static array "val" of size 12 bytes by passing it to a function which indexes it with argument "sizeof (val) /*12*/" at byte position 12. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: OVERRUN_STATIC (CWE-125): /builddir/build/BUILD/bash-4.2/variables.c:922: overrun-buffer-arg: Overrunning static array "val" of size 12 bytes by passing it to a function which indexes it with argument "sizeof (val) /*12*/" at byte position 12. /builddir/build/BUILD/bash-4.2/lib/sh/itos.c:38: access_dbuff_in_call: Calling "fmtumax" indexes array "buf" with index "len". /builddir/build/BUILD/bash-4.2/lib/sh/fmtulong.c:102: index_parm: Pointer "buf" is directly accessed by indexing it with parameter "len". Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/hashlib.c:255: alloc_fn: Calling allocation function "hash_create". /builddir/build/BUILD/bash-4.2/hashlib.c:52: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/hashlib.c:52: var_assign: Assigning: "new_table" = "xmalloc(sizeof (HASH_TABLE) /*16*/)". /builddir/build/BUILD/bash-4.2/hashlib.c:64: return_alloc: Returning allocated memory "new_table". /builddir/build/BUILD/bash-4.2/hashlib.c:255: var_assign: Assigning: "table" = storage returned from "hash_create(0)". /builddir/build/BUILD/bash-4.2/hashlib.c:257: noescape: Variable "table" is not freed or pointed-to in function "hash_search". /builddir/build/BUILD/bash-4.2/hashlib.c:166:22: noescape: "hash_search" does not free or save its pointer parameter "table". /builddir/build/BUILD/bash-4.2/hashlib.c:276: leaked_storage: Returning without freeing "table"leaks the storage that it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/array.c:617: alloc_fn: Calling allocation function "array_create_element". /builddir/build/BUILD/bash-4.2/array.c:577: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/array.c:577: var_assign: Assigning: "r" = "xmalloc(sizeof (ARRAY_ELEMENT) /*32*/)". /builddir/build/BUILD/bash-4.2/array.c:581: return_alloc: Returning allocated memory "r". /builddir/build/BUILD/bash-4.2/array.c:617: var_assign: Assigning: "new" = storage returned from "array_create_element(i, v)". /builddir/build/BUILD/bash-4.2/array.c:651: leaked_storage: Variable "new" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/array.c:811: alloc_fn: Calling allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/array.c:811: var_assign: Assigning: "result" = storage returned from "xmalloc(rsize = 64)". /builddir/build/BUILD/bash-4.2/array.c:811: overwrite_var: Overwriting "result" in call "result = (char *)xmalloc(rsize = 64)" leaks the storage that "result" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/array.c:815: alloc_fn: Calling allocation function "xrealloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:74: alloc_fn: Storage is returned from allocation function "realloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:74: var_assign: Assigning: "temp" = "realloc(pointer, bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:78: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/array.c:815: var_assign: Assigning: "result" = storage returned from "xrealloc(result, rsize)". /builddir/build/BUILD/bash-4.2/array.c:817: noescape: Variable "result" is not freed or pointed-to in function "strcpy". /builddir/build/BUILD/bash-4.2/array.c:825: noescape: Variable "result" is not freed or pointed-to in function "strcpy". /builddir/build/BUILD/bash-4.2/array.c:811: overwrite_var: Overwriting "result" in call "result = (char *)xmalloc(rsize = 64)" leaks the storage that "result" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:4325: alloc_arg: Calling allocation function "xdupmbstowcs" on "indices". /builddir/build/BUILD/bash-4.2/lib/glob/xmbsrtowcs.c:275: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/glob/xmbsrtowcs.c:275: var_assign: Assigning: "indices" = "malloc(wsbuf_size * sizeof (char *) /*8*/)". /builddir/build/BUILD/bash-4.2/lib/glob/xmbsrtowcs.c:361: var_assign: Assigning: "*indicesp" = "indices". /builddir/build/BUILD/bash-4.2/subst.c:4329: leaked_storage: Variable "indices" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:4325: alloc_arg: Calling allocation function "xdupmbstowcs" on "wstring". /builddir/build/BUILD/bash-4.2/lib/glob/xmbsrtowcs.c:265: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/glob/xmbsrtowcs.c:265: var_assign: Assigning: "wsbuf" = "malloc(wsbuf_size * sizeof (wchar_t) /*4*/)". /builddir/build/BUILD/bash-4.2/lib/glob/xmbsrtowcs.c:359: var_assign: Assigning: "*destp" = "wsbuf". /builddir/build/BUILD/bash-4.2/subst.c:4329: leaked_storage: Variable "wstring" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1428: alloc_fn: Calling allocation function "string_extract". /builddir/build/BUILD/bash-4.2/subst.c:749: alloc_fn: Storage is returned from allocation function "substring". /builddir/build/BUILD/bash-4.2/stringlib.c:135: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/stringlib.c:135: var_assign: Assigning: "result" = "xmalloc(len + 1)". /builddir/build/BUILD/bash-4.2/stringlib.c:136: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/stringlib.c:138: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:749: var_assign: Assigning: "temp" = "substring(string, *sindex, i)". /builddir/build/BUILD/bash-4.2/subst.c:752: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1428: var_assign: Assigning: "t" = storage returned from "string_extract(string, &si, "`", flags | 1)". /builddir/build/BUILD/bash-4.2/subst.c:1438: overwrite_var: Overwriting "t" in call "t = extract_command_subst(string, &si, flags | 1)" leaks the storage that "t" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1428: alloc_fn: Calling allocation function "string_extract". /builddir/build/BUILD/bash-4.2/subst.c:749: alloc_fn: Storage is returned from allocation function "substring". /builddir/build/BUILD/bash-4.2/stringlib.c:135: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/stringlib.c:135: var_assign: Assigning: "result" = "xmalloc(len + 1)". /builddir/build/BUILD/bash-4.2/stringlib.c:136: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/stringlib.c:138: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:749: var_assign: Assigning: "temp" = "substring(string, *sindex, i)". /builddir/build/BUILD/bash-4.2/subst.c:752: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1428: var_assign: Assigning: "t" = storage returned from "string_extract(string, &si, "`", flags | 1)". /builddir/build/BUILD/bash-4.2/subst.c:1428: overwrite_var: Overwriting "t" in call "t = string_extract(string, &si, "`", flags | 1)" leaks the storage that "t" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1428: alloc_fn: Calling allocation function "string_extract". /builddir/build/BUILD/bash-4.2/subst.c:749: alloc_fn: Storage is returned from allocation function "substring". /builddir/build/BUILD/bash-4.2/stringlib.c:135: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/stringlib.c:135: var_assign: Assigning: "result" = "xmalloc(len + 1)". /builddir/build/BUILD/bash-4.2/stringlib.c:136: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/stringlib.c:138: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:749: var_assign: Assigning: "temp" = "substring(string, *sindex, i)". /builddir/build/BUILD/bash-4.2/subst.c:752: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1428: var_assign: Assigning: "t" = storage returned from "string_extract(string, &si, "`", flags | 1)". /builddir/build/BUILD/bash-4.2/subst.c:1511: leaked_storage: Variable "t" going out of scope leaks the storage it points to. /builddir/build/BUILD/bash-4.2/subst.c:1518: leaked_storage: Variable "t" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:965: alloc_fn: Calling allocation function "extract_dollar_brace_string". /builddir/build/BUILD/bash-4.2/subst.c:1515: alloc_fn: Storage is returned from allocation function "substring". /builddir/build/BUILD/bash-4.2/stringlib.c:135: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/stringlib.c:135: var_assign: Assigning: "result" = "xmalloc(len + 1)". /builddir/build/BUILD/bash-4.2/stringlib.c:136: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/stringlib.c:138: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:1515: var_assign: Assigning: "result" = "substring(string, *sindex, i)". /builddir/build/BUILD/bash-4.2/subst.c:1518: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:965: var_assign: Assigning: "ret" = storage returned from "extract_dollar_brace_string(string, &si, 1, 1)". /builddir/build/BUILD/bash-4.2/subst.c:963: overwrite_var: Overwriting "ret" in call "ret = extract_command_subst(string, &si, 1)" leaks the storage that "ret" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:965: alloc_fn: Calling allocation function "extract_dollar_brace_string". /builddir/build/BUILD/bash-4.2/subst.c:1515: alloc_fn: Storage is returned from allocation function "substring". /builddir/build/BUILD/bash-4.2/stringlib.c:135: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/stringlib.c:135: var_assign: Assigning: "result" = "xmalloc(len + 1)". /builddir/build/BUILD/bash-4.2/stringlib.c:136: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/stringlib.c:138: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:1515: var_assign: Assigning: "result" = "substring(string, *sindex, i)". /builddir/build/BUILD/bash-4.2/subst.c:1518: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:965: var_assign: Assigning: "ret" = storage returned from "extract_dollar_brace_string(string, &si, 1, 1)". /builddir/build/BUILD/bash-4.2/subst.c:965: overwrite_var: Overwriting "ret" in call "ret = extract_dollar_brace_string(string, &si, 1, 1)" leaks the storage that "ret" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:965: alloc_fn: Calling allocation function "extract_dollar_brace_string". /builddir/build/BUILD/bash-4.2/subst.c:1515: alloc_fn: Storage is returned from allocation function "substring". /builddir/build/BUILD/bash-4.2/stringlib.c:135: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/stringlib.c:135: var_assign: Assigning: "result" = "xmalloc(len + 1)". /builddir/build/BUILD/bash-4.2/stringlib.c:136: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/stringlib.c:138: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:1515: var_assign: Assigning: "result" = "substring(string, *sindex, i)". /builddir/build/BUILD/bash-4.2/subst.c:1518: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:965: var_assign: Assigning: "ret" = storage returned from "extract_dollar_brace_string(string, &si, 1, 1)". /builddir/build/BUILD/bash-4.2/subst.c:982: leaked_storage: Variable "ret" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1311: alloc_fn: Calling allocation function "string_extract". /builddir/build/BUILD/bash-4.2/subst.c:749: alloc_fn: Storage is returned from allocation function "substring". /builddir/build/BUILD/bash-4.2/stringlib.c:135: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/stringlib.c:135: var_assign: Assigning: "result" = "xmalloc(len + 1)". /builddir/build/BUILD/bash-4.2/stringlib.c:136: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/stringlib.c:138: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:749: var_assign: Assigning: "temp" = "substring(string, *sindex, i)". /builddir/build/BUILD/bash-4.2/subst.c:752: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1311: var_assign: Assigning: "t" = storage returned from "string_extract(string, &si, "`", flags | 1)". /builddir/build/BUILD/bash-4.2/subst.c:1274: overwrite_var: Overwriting "t" in call "t = extract_command_subst(string, &si, flags | 1)" leaks the storage that "t" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1311: alloc_fn: Calling allocation function "string_extract". /builddir/build/BUILD/bash-4.2/subst.c:749: alloc_fn: Storage is returned from allocation function "substring". /builddir/build/BUILD/bash-4.2/stringlib.c:135: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/stringlib.c:135: var_assign: Assigning: "result" = "xmalloc(len + 1)". /builddir/build/BUILD/bash-4.2/stringlib.c:136: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/stringlib.c:138: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:749: var_assign: Assigning: "temp" = "substring(string, *sindex, i)". /builddir/build/BUILD/bash-4.2/subst.c:752: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1311: var_assign: Assigning: "t" = storage returned from "string_extract(string, &si, "`", flags | 1)". /builddir/build/BUILD/bash-4.2/subst.c:1283: overwrite_var: Overwriting "t" in call "t = extract_delimited_string(string, &si, opener, alt_opener, closer, flags | 1)" leaks the storage that "t" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1311: alloc_fn: Calling allocation function "string_extract". /builddir/build/BUILD/bash-4.2/subst.c:749: alloc_fn: Storage is returned from allocation function "substring". /builddir/build/BUILD/bash-4.2/stringlib.c:135: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/stringlib.c:135: var_assign: Assigning: "result" = "xmalloc(len + 1)". /builddir/build/BUILD/bash-4.2/stringlib.c:136: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/stringlib.c:138: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:749: var_assign: Assigning: "temp" = "substring(string, *sindex, i)". /builddir/build/BUILD/bash-4.2/subst.c:752: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1311: var_assign: Assigning: "t" = storage returned from "string_extract(string, &si, "`", flags | 1)". /builddir/build/BUILD/bash-4.2/subst.c:1340: leaked_storage: Variable "t" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/arrayfunc.c:499: alloc_fn: Calling allocation function "substring". /builddir/build/BUILD/bash-4.2/stringlib.c:135: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/stringlib.c:135: var_assign: Assigning: "result" = "xmalloc(len + 1)". /builddir/build/BUILD/bash-4.2/stringlib.c:136: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/stringlib.c:138: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/arrayfunc.c:499: var_assign: Assigning: "akey" = storage returned from "substring(w, 1, len)". /builddir/build/BUILD/bash-4.2/arrayfunc.c:499: overwrite_var: Overwriting "akey" in call "akey = substring(w, 1, len)" leaks the storage that "akey" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/arrayfunc.c:499: alloc_fn: Calling allocation function "substring". /builddir/build/BUILD/bash-4.2/stringlib.c:135: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/stringlib.c:135: var_assign: Assigning: "result" = "xmalloc(len + 1)". /builddir/build/BUILD/bash-4.2/stringlib.c:136: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/stringlib.c:138: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/arrayfunc.c:499: var_assign: Assigning: "akey" = storage returned from "substring(w, 1, len)". /builddir/build/BUILD/bash-4.2/arrayfunc.c:532: leaked_storage: Variable "akey" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/arrayfunc.c:262: alloc_fn: Calling allocation function "expand_assignment_string_to_string". /builddir/build/BUILD/bash-4.2/subst.c:3103: alloc_fn: Storage is returned from allocation function "expand_string_to_string_internal". /builddir/build/BUILD/bash-4.2/subst.c:3073: alloc_fn: Storage is returned from allocation function "string_list". /builddir/build/BUILD/bash-4.2/subst.c:2159: alloc_fn: Storage is returned from allocation function "string_list_internal". /builddir/build/BUILD/bash-4.2/subst.c:2116: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:2116: return_alloc_fn: Directly returning storage allocated by "strcpy". /builddir/build/BUILD/bash-4.2/subst.c:2159: return_alloc_fn: Directly returning storage allocated by "string_list_internal". /builddir/build/BUILD/bash-4.2/subst.c:3073: var_assign: Assigning: "ret" = "string_list(list)". /builddir/build/BUILD/bash-4.2/subst.c:3079: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/subst.c:3103: return_alloc_fn: Directly returning storage allocated by "expand_string_to_string_internal". /builddir/build/BUILD/bash-4.2/arrayfunc.c:262: var_assign: Assigning: "akey" = storage returned from "expand_assignment_string_to_string(sub, 0)". /builddir/build/BUILD/bash-4.2/arrayfunc.c:268: leaked_storage: Variable "akey" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:800: alloc_fn: Calling allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:800: var_assign: Assigning: "result" = storage returned from "malloc((i + 1U) * sizeof (char *) /*8*/)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:810: leaked_storage: Variable "result" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:606: alloc_fn: Calling allocation function "finddirs". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:368: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:368: var_assign: Assigning: "g" = "malloc(sizeof (struct globval) /*16*/)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:389: var_assign: Assigning: "ret" = "g". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:400: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:606: var_assign: Assigning: "dirlist" = storage returned from "finddirs(pat, subdir, flags & 0xfffffffffffffdff, &e, &ndirs)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:606: overwrite_var: Overwriting "dirlist" in call "dirlist = finddirs(pat, subdir, flags & 0xfffffffffffffdff, &e, &ndirs)" leaks the storage that "dirlist" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:606: alloc_fn: Calling allocation function "finddirs". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:368: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:368: var_assign: Assigning: "g" = "malloc(sizeof (struct globval) /*16*/)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:389: var_assign: Assigning: "ret" = "g". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:400: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:606: var_assign: Assigning: "dirlist" = storage returned from "finddirs(pat, subdir, flags & 0xfffffffffffffdff, &e, &ndirs)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:730: leaked_storage: Variable "dirlist" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:488: alloc_fn: Calling allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:488: var_assign: Assigning: "nextname" = storage returned from "malloc(dirlen + patlen + 2)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:730: leaked_storage: Variable "nextname" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:489: alloc_fn: Calling allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:489: var_assign: Assigning: "npat" = storage returned from "malloc(patlen + 1)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:730: leaked_storage: Variable "npat" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:623: alloc_fn: Calling allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:623: var_assign: Assigning: "nextlink" = storage returned from "malloc(sizeof (struct globval) /*16*/)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:682: overwrite_var: Overwriting "nextlink" in call "nextlink = (struct globval *)malloc(sizeof (struct globval) /*16*/)" leaks the storage that "nextlink" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:627: alloc_fn: Calling allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:627: var_assign: Assigning: "nextname" = storage returned from "malloc(sdlen + 1)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:681: overwrite_var: Overwriting "nextname" in call "nextname = (char *)malloc(sdlen + 1)" leaks the storage that "nextname" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:658: alloc_fn: Calling allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:658: var_assign: Assigning: "nextname" = storage returned from "malloc(strlen(dp->d_name) + 1UL)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:681: overwrite_var: Overwriting "nextname" in call "nextname = (char *)malloc(sdlen + 1)" leaks the storage that "nextname" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:681: alloc_fn: Calling allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:681: var_assign: Assigning: "nextname" = storage returned from "malloc(sdlen + 1)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:730: leaked_storage: Variable "nextname" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:593: alloc_fn: Calling allocation function "sh_makepath". /builddir/build/BUILD/bash-4.2/lib/sh/makepath.c:116: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/lib/sh/makepath.c:116: var_assign: Assigning: "ret" = "xmalloc(2 + dirlen + pathlen)". /builddir/build/BUILD/bash-4.2/lib/sh/makepath.c:116: var_assign: Assigning: "r" = "ret". /builddir/build/BUILD/bash-4.2/lib/sh/makepath.c:127: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:593: var_assign: Assigning: "subdir" = storage returned from "sh_makepath(dir, dp->d_name, pflags)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:594: noescape: Variable "subdir" is not freed or pointed-to in function "glob_testdir". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:320:15: noescape: "glob_testdir" does not free or save its pointer parameter "dir". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:593: overwrite_var: Overwriting "subdir" in call "subdir = sh_makepath(dir, dp->d_name, pflags)" leaks the storage that "subdir" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:593: alloc_fn: Calling allocation function "sh_makepath". /builddir/build/BUILD/bash-4.2/lib/sh/makepath.c:116: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/lib/sh/makepath.c:116: var_assign: Assigning: "ret" = "xmalloc(2 + dirlen + pathlen)". /builddir/build/BUILD/bash-4.2/lib/sh/makepath.c:116: var_assign: Assigning: "r" = "ret". /builddir/build/BUILD/bash-4.2/lib/sh/makepath.c:127: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:593: var_assign: Assigning: "subdir" = storage returned from "sh_makepath(dir, dp->d_name, pflags)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:594: noescape: Variable "subdir" is not freed or pointed-to in function "glob_testdir". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:320:15: noescape: "glob_testdir" does not free or save its pointer parameter "dir". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:730: leaked_storage: Variable "subdir" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:682: alloc_fn: Calling allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:682: var_assign: Assigning: "nextlink" = storage returned from "malloc(sizeof (struct globval) /*16*/)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:689: var_assign: Assigning: "lastlink" = "nextlink". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:724: overwrite_var: Overwriting "lastlink" in call "lastlink = lastlink->next" leaks the storage that "lastlink" points to. /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:730: leaked_storage: Variable "nextlink" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:682: alloc_fn: Calling allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:682: var_assign: Assigning: "nextlink" = storage returned from "malloc(sizeof (struct globval) /*16*/)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:689: var_assign: Assigning: "lastlink" = "nextlink". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:734: var_assign: Assigning: "tmplink" = "lastlink". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:737: overwrite_var: Overwriting "tmplink" in call "tmplink = tmplink->next" leaks the storage that "tmplink" points to. /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:757: leaked_storage: Variable "nextlink" going out of scope leaks the storage it points to. /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:757: leaked_storage: Variable "lastlink" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:854: alloc_fn: Calling allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:854: var_assign: Assigning: "result" = storage returned from "malloc(sizeof (char *) /*8*/)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:878: leaked_storage: Variable "result" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:944: alloc_fn: Calling allocation function "glob_vector". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:700: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:700: var_assign: Assigning: "name_vector" = "malloc((count + 1U) * sizeof (char *) /*8*/)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:757: return_alloc: Returning allocated memory "name_vector". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:944: var_assign: Assigning: "temp_results" = storage returned from "glob_vector(filename, dname, dflags)". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:960: var_assign: Assigning: "array" = "temp_results". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:971: leaked_storage: Variable "array" going out of scope leaks the storage it points to. /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:971: leaked_storage: Variable "temp_results" going out of scope leaks the storage it points to. /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:981: leaked_storage: Variable "array" going out of scope leaks the storage it points to. /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:982: leaked_storage: Variable "temp_results" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/arrayfunc.c:955: alloc_fn: Calling allocation function "expand_assignment_string_to_string". /builddir/build/BUILD/bash-4.2/subst.c:3103: alloc_fn: Storage is returned from allocation function "expand_string_to_string_internal". /builddir/build/BUILD/bash-4.2/subst.c:3073: alloc_fn: Storage is returned from allocation function "string_list". /builddir/build/BUILD/bash-4.2/subst.c:2159: alloc_fn: Storage is returned from allocation function "string_list_internal". /builddir/build/BUILD/bash-4.2/subst.c:2116: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:2116: return_alloc_fn: Directly returning storage allocated by "strcpy". /builddir/build/BUILD/bash-4.2/subst.c:2159: return_alloc_fn: Directly returning storage allocated by "string_list_internal". /builddir/build/BUILD/bash-4.2/subst.c:3073: var_assign: Assigning: "ret" = "string_list(list)". /builddir/build/BUILD/bash-4.2/subst.c:3079: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/subst.c:3103: return_alloc_fn: Directly returning storage allocated by "expand_string_to_string_internal". /builddir/build/BUILD/bash-4.2/arrayfunc.c:955: var_assign: Assigning: "akey" = storage returned from "expand_assignment_string_to_string(t, 0)". /builddir/build/BUILD/bash-4.2/arrayfunc.c:958: leaked_storage: Variable "akey" going out of scope leaks the storage it points to. /builddir/build/BUILD/bash-4.2/arrayfunc.c:962: leaked_storage: Variable "akey" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/assoc.c:519: alloc_fn: Calling allocation function "make_word_list". /builddir/build/BUILD/bash-4.2/make_cmd.c:172: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/make_cmd.c:172: var_assign: Assigning: "temp" = "xmalloc(sizeof (WORD_LIST) /*16*/)". /builddir/build/BUILD/bash-4.2/make_cmd.c:176: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/assoc.c:519: var_assign: Assigning: "list" = storage returned from "make_word_list(make_bare_word(t), list)". /builddir/build/BUILD/bash-4.2/assoc.c:523: var_assign: Assigning: "l" = "list". /builddir/build/BUILD/bash-4.2/assoc.c:525: noescape: Variable "l" is not freed or pointed-to in function "string_list_internal". /builddir/build/BUILD/bash-4.2/subst.c:2103:23: noescape: "string_list_internal" does not free or save its pointer parameter "list". /builddir/build/BUILD/bash-4.2/assoc.c:526: leaked_storage: Variable "l" going out of scope leaks the storage it points to. /builddir/build/BUILD/bash-4.2/assoc.c:526: leaked_storage: Variable "list" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:6772: alloc_arg: Calling allocation function "get_var_and_type" on "val". /builddir/build/BUILD/bash-4.2/subst.c:6227: alloc_fn: Storage is returned from allocation function "array_value". /builddir/build/BUILD/bash-4.2/arrayfunc.c:985: alloc_fn: Storage is returned from allocation function "array_value_internal". /builddir/build/BUILD/bash-4.2/arrayfunc.c:921: alloc_fn: Storage is returned from allocation function "quote_string". /builddir/build/BUILD/bash-4.2/subst.c:3555: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:3555: var_assign: Assigning: "result" = "xmalloc(2UL)". /builddir/build/BUILD/bash-4.2/subst.c:3575: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/arrayfunc.c:921: var_assign: Assigning: "retval" = "quote_string(temp)". /builddir/build/BUILD/bash-4.2/arrayfunc.c:974: return_alloc: Returning allocated memory "retval". /builddir/build/BUILD/bash-4.2/arrayfunc.c:985: return_alloc_fn: Directly returning storage allocated by "array_value_internal". /builddir/build/BUILD/bash-4.2/subst.c:6227: var_assign: Assigning: "*valp" = "array_value(varname, 1, flags, NULL, &lind)". /builddir/build/BUILD/bash-4.2/subst.c:6816: noescape: Variable "val" is not freed or pointed-to in function "sh_modcase". /builddir/build/BUILD/bash-4.2/lib/sh/casemod.c:97:13: noescape: "sh_modcase" does not free or save its pointer parameter "string". /builddir/build/BUILD/bash-4.2/subst.c:6851: leaked_storage: Variable "val" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:5673: alloc_fn: Calling allocation function "array_value". /builddir/build/BUILD/bash-4.2/arrayfunc.c:985: alloc_fn: Storage is returned from allocation function "array_value_internal". /builddir/build/BUILD/bash-4.2/arrayfunc.c:921: alloc_fn: Storage is returned from allocation function "quote_string". /builddir/build/BUILD/bash-4.2/subst.c:3555: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:3555: var_assign: Assigning: "result" = "xmalloc(2UL)". /builddir/build/BUILD/bash-4.2/subst.c:3575: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/arrayfunc.c:921: var_assign: Assigning: "retval" = "quote_string(temp)". /builddir/build/BUILD/bash-4.2/arrayfunc.c:974: return_alloc: Returning allocated memory "retval". /builddir/build/BUILD/bash-4.2/arrayfunc.c:985: return_alloc_fn: Directly returning storage allocated by "array_value_internal". /builddir/build/BUILD/bash-4.2/subst.c:5673: var_assign: Assigning: "temp" = storage returned from "array_value(name, quoted, 0, &atype, &ind)". /builddir/build/BUILD/bash-4.2/subst.c:5676: overwrite_var: Overwriting "temp" in call "temp = ((*temp && quoted & 3) ? quote_string(temp) : quote_escapes(temp))" leaks the storage that "temp" points to. /builddir/build/BUILD/bash-4.2/subst.c:5676: noescape: Variable "temp" is not freed or pointed-to in function "quote_escapes". /builddir/build/BUILD/bash-4.2/subst.c:3423:16: noescape: "quote_escapes" does not free or save its pointer parameter "string". /builddir/build/BUILD/bash-4.2/subst.c:5676: noescape: Variable "temp" is not freed or pointed-to in function "quote_string". /builddir/build/BUILD/bash-4.2/subst.c:3546:15: noescape: "quote_string" does not free or save its pointer parameter "string". Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:5516: alloc_fn: Calling allocation function "expand_assignment_string_to_string". /builddir/build/BUILD/bash-4.2/subst.c:3103: alloc_fn: Storage is returned from allocation function "expand_string_to_string_internal". /builddir/build/BUILD/bash-4.2/subst.c:3073: alloc_fn: Storage is returned from allocation function "string_list". /builddir/build/BUILD/bash-4.2/subst.c:2159: alloc_fn: Storage is returned from allocation function "string_list_internal". /builddir/build/BUILD/bash-4.2/subst.c:2116: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:2116: return_alloc_fn: Directly returning storage allocated by "strcpy". /builddir/build/BUILD/bash-4.2/subst.c:2159: return_alloc_fn: Directly returning storage allocated by "string_list_internal". /builddir/build/BUILD/bash-4.2/subst.c:3073: var_assign: Assigning: "ret" = "string_list(list)". /builddir/build/BUILD/bash-4.2/subst.c:3079: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/subst.c:3103: return_alloc_fn: Directly returning storage allocated by "expand_string_to_string_internal". /builddir/build/BUILD/bash-4.2/subst.c:5516: var_assign: Assigning: "akey" = storage returned from "expand_assignment_string_to_string(t, 0)". /builddir/build/BUILD/bash-4.2/subst.c:5521: leaked_storage: Variable "akey" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1758: alloc_fn: Calling allocation function "extract_delimited_string". /builddir/build/BUILD/bash-4.2/subst.c:1349: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1349: var_assign: Assigning: "result" = "xmalloc(1 + si)". /builddir/build/BUILD/bash-4.2/subst.c:1350: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/subst.c:1355: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:1758: var_assign: Assigning: "temp" = storage returned from "extract_delimited_string(string, &si, "$(", "(", ")", 9)". /builddir/build/BUILD/bash-4.2/subst.c:1758: overwrite_var: Overwriting "temp" in call "temp = extract_delimited_string(string, &si, "$(", "(", ")", 9)" leaks the storage that "temp" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1758: alloc_fn: Calling allocation function "extract_delimited_string". /builddir/build/BUILD/bash-4.2/subst.c:1349: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1349: var_assign: Assigning: "result" = "xmalloc(1 + si)". /builddir/build/BUILD/bash-4.2/subst.c:1350: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/subst.c:1355: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:1758: var_assign: Assigning: "temp" = storage returned from "extract_delimited_string(string, &si, "$(", "(", ")", 9)". /builddir/build/BUILD/bash-4.2/subst.c:1760: overwrite_var: Overwriting "temp" in call "temp = extract_dollar_brace_string(string, &si, 0, 1)" leaks the storage that "temp" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1758: alloc_fn: Calling allocation function "extract_delimited_string". /builddir/build/BUILD/bash-4.2/subst.c:1349: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1349: var_assign: Assigning: "result" = "xmalloc(1 + si)". /builddir/build/BUILD/bash-4.2/subst.c:1350: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/subst.c:1355: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:1758: var_assign: Assigning: "temp" = storage returned from "extract_delimited_string(string, &si, "$(", "(", ")", 9)". /builddir/build/BUILD/bash-4.2/subst.c:1773: overwrite_var: Overwriting "temp" in call "temp = extract_process_subst(string, ((c == 60) ? "<(" : ">("), &si)" leaks the storage that "temp" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1791: alloc_fn: Calling allocation function "extract_delimited_string". /builddir/build/BUILD/bash-4.2/subst.c:1349: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1349: var_assign: Assigning: "result" = "xmalloc(1 + si)". /builddir/build/BUILD/bash-4.2/subst.c:1350: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/subst.c:1355: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:1791: var_assign: Assigning: "temp" = storage returned from "extract_delimited_string(string, &si, open, "(", ")", 1)". /builddir/build/BUILD/bash-4.2/subst.c:1806: leaked_storage: Variable "temp" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1760: alloc_fn: Calling allocation function "extract_dollar_brace_string". /builddir/build/BUILD/bash-4.2/subst.c:1515: alloc_fn: Storage is returned from allocation function "substring". /builddir/build/BUILD/bash-4.2/stringlib.c:135: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/stringlib.c:135: var_assign: Assigning: "result" = "xmalloc(len + 1)". /builddir/build/BUILD/bash-4.2/stringlib.c:136: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/stringlib.c:138: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:1515: var_assign: Assigning: "result" = "substring(string, *sindex, i)". /builddir/build/BUILD/bash-4.2/subst.c:1518: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:1760: var_assign: Assigning: "temp" = storage returned from "extract_dollar_brace_string(string, &si, 0, 1)". /builddir/build/BUILD/bash-4.2/subst.c:1806: leaked_storage: Variable "temp" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1773: alloc_fn: Calling allocation function "extract_process_subst". /builddir/build/BUILD/bash-4.2/subst.c:1172: alloc_fn: Storage is returned from allocation function "extract_delimited_string". /builddir/build/BUILD/bash-4.2/subst.c:1349: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1349: var_assign: Assigning: "result" = "xmalloc(1 + si)". /builddir/build/BUILD/bash-4.2/subst.c:1350: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/subst.c:1355: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:1172: return_alloc_fn: Directly returning storage allocated by "extract_delimited_string". /builddir/build/BUILD/bash-4.2/subst.c:1773: var_assign: Assigning: "temp" = storage returned from "extract_process_subst(string, ((c == 60) ? "<(" : ">("), &si)". /builddir/build/BUILD/bash-4.2/subst.c:1791: overwrite_var: Overwriting "temp" in call "temp = extract_delimited_string(string, &si, open, "(", ")", 1)" leaks the storage that "temp" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1773: alloc_fn: Calling allocation function "extract_process_subst". /builddir/build/BUILD/bash-4.2/subst.c:1172: alloc_fn: Storage is returned from allocation function "extract_delimited_string". /builddir/build/BUILD/bash-4.2/subst.c:1349: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1349: var_assign: Assigning: "result" = "xmalloc(1 + si)". /builddir/build/BUILD/bash-4.2/subst.c:1350: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/subst.c:1355: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:1172: return_alloc_fn: Directly returning storage allocated by "extract_delimited_string". /builddir/build/BUILD/bash-4.2/subst.c:1773: var_assign: Assigning: "temp" = storage returned from "extract_process_subst(string, ((c == 60) ? "<(" : ">("), &si)". /builddir/build/BUILD/bash-4.2/subst.c:1773: overwrite_var: Overwriting "temp" in call "temp = extract_process_subst(string, ((c == 60) ? "<(" : ">("), &si)" leaks the storage that "temp" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1758: overwrite_var: Overwriting "temp" in call "temp = extract_delimited_string(string, &si, "$(", "(", ")", 9)" leaks the storage that "temp" points to. /builddir/build/BUILD/bash-4.2/subst.c:1773: alloc_fn: Calling allocation function "extract_process_subst". /builddir/build/BUILD/bash-4.2/subst.c:1172: alloc_fn: Storage is returned from allocation function "extract_delimited_string". /builddir/build/BUILD/bash-4.2/subst.c:1349: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1349: var_assign: Assigning: "result" = "xmalloc(1 + si)". /builddir/build/BUILD/bash-4.2/subst.c:1350: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/subst.c:1355: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:1172: return_alloc_fn: Directly returning storage allocated by "extract_delimited_string". /builddir/build/BUILD/bash-4.2/subst.c:1773: var_assign: Assigning: "temp" = storage returned from "extract_process_subst(string, ((c == 60) ? "<(" : ">("), &si)". Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1760: overwrite_var: Overwriting "temp" in call "temp = extract_dollar_brace_string(string, &si, 0, 1)" leaks the storage that "temp" points to. /builddir/build/BUILD/bash-4.2/subst.c:1773: alloc_fn: Calling allocation function "extract_process_subst". /builddir/build/BUILD/bash-4.2/subst.c:1172: alloc_fn: Storage is returned from allocation function "extract_delimited_string". /builddir/build/BUILD/bash-4.2/subst.c:1349: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1349: var_assign: Assigning: "result" = "xmalloc(1 + si)". /builddir/build/BUILD/bash-4.2/subst.c:1350: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/subst.c:1355: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:1172: return_alloc_fn: Directly returning storage allocated by "extract_delimited_string". /builddir/build/BUILD/bash-4.2/subst.c:1773: var_assign: Assigning: "temp" = storage returned from "extract_process_subst(string, ((c == 60) ? "<(" : ">("), &si)". Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1755: leaked_storage: Variable "temp" going out of scope leaks the storage it points to. /builddir/build/BUILD/bash-4.2/subst.c:1758: alloc_fn: Calling allocation function "extract_delimited_string". /builddir/build/BUILD/bash-4.2/subst.c:1349: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1349: var_assign: Assigning: "result" = "xmalloc(1 + si)". /builddir/build/BUILD/bash-4.2/subst.c:1350: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/subst.c:1355: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:1758: var_assign: Assigning: "temp" = storage returned from "extract_delimited_string(string, &si, "$(", "(", ")", 9)". /builddir/build/BUILD/bash-4.2/subst.c:1772: leaked_storage: Variable "temp" going out of scope leaks the storage it points to. /builddir/build/BUILD/bash-4.2/subst.c:1806: leaked_storage: Variable "temp" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1755: leaked_storage: Variable "temp" going out of scope leaks the storage it points to. /builddir/build/BUILD/bash-4.2/subst.c:1772: leaked_storage: Variable "temp" going out of scope leaks the storage it points to. /builddir/build/BUILD/bash-4.2/subst.c:1773: alloc_fn: Calling allocation function "extract_process_subst". /builddir/build/BUILD/bash-4.2/subst.c:1172: alloc_fn: Storage is returned from allocation function "extract_delimited_string". /builddir/build/BUILD/bash-4.2/subst.c:1349: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1349: var_assign: Assigning: "result" = "xmalloc(1 + si)". /builddir/build/BUILD/bash-4.2/subst.c:1350: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/subst.c:1355: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:1172: return_alloc_fn: Directly returning storage allocated by "extract_delimited_string". /builddir/build/BUILD/bash-4.2/subst.c:1773: var_assign: Assigning: "temp" = storage returned from "extract_process_subst(string, ((c == 60) ? "<(" : ">("), &si)". /builddir/build/BUILD/bash-4.2/subst.c:1786: leaked_storage: Variable "temp" going out of scope leaks the storage it points to. /builddir/build/BUILD/bash-4.2/subst.c:1806: leaked_storage: Variable "temp" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:2969: alloc_fn: Calling allocation function "list_rest_of_args". /builddir/build/BUILD/bash-4.2/subst.c:2897: alloc_fn: Storage is returned from allocation function "make_word_list". /builddir/build/BUILD/bash-4.2/make_cmd.c:172: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/make_cmd.c:172: var_assign: Assigning: "temp" = "xmalloc(sizeof (WORD_LIST) /*16*/)". /builddir/build/BUILD/bash-4.2/make_cmd.c:176: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:2897: var_assign: Assigning: "list" = "make_word_list(make_bare_word(args->word->word), list)". /builddir/build/BUILD/bash-4.2/subst.c:2899: return_alloc: Returning allocated memory "list". /builddir/build/BUILD/bash-4.2/subst.c:2969: var_assign: Assigning: "params" = storage returned from "list_rest_of_args()". /builddir/build/BUILD/bash-4.2/subst.c:2969: var_assign: Assigning: "save" = "params". /builddir/build/BUILD/bash-4.2/subst.c:2980: overwrite_var: Overwriting "params" in call "params = params->next" leaks the storage that "params" points to. /builddir/build/BUILD/bash-4.2/subst.c:2982: leaked_storage: Variable "save" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/assoc.c:245: alloc_fn: Calling allocation function "assoc_to_word_list". /builddir/build/BUILD/bash-4.2/assoc.c:481: alloc_fn: Storage is returned from allocation function "assoc_to_word_list_internal". /builddir/build/BUILD/bash-4.2/assoc.c:472: alloc_fn: Storage is returned from allocation function "make_word_list". /builddir/build/BUILD/bash-4.2/make_cmd.c:172: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/make_cmd.c:172: var_assign: Assigning: "temp" = "xmalloc(sizeof (WORD_LIST) /*16*/)". /builddir/build/BUILD/bash-4.2/make_cmd.c:176: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/assoc.c:472: var_assign: Assigning: "list" = "make_word_list(make_bare_word(w), list)". /builddir/build/BUILD/bash-4.2/assoc.c:474: return_alloc: Returning allocated memory "list". /builddir/build/BUILD/bash-4.2/assoc.c:481: return_alloc_fn: Directly returning storage allocated by "assoc_to_word_list_internal". /builddir/build/BUILD/bash-4.2/assoc.c:245: var_assign: Assigning: "l" = storage returned from "assoc_to_word_list(hash)". /builddir/build/BUILD/bash-4.2/assoc.c:245: var_assign: Assigning: "save" = "l". /builddir/build/BUILD/bash-4.2/assoc.c:250: overwrite_var: Overwriting "l" in call "l = l->next" leaks the storage that "l" points to. /builddir/build/BUILD/bash-4.2/assoc.c:252: leaked_storage: Variable "save" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:6311: alloc_arg: Calling allocation function "get_var_and_type" on "val". /builddir/build/BUILD/bash-4.2/subst.c:6227: alloc_fn: Storage is returned from allocation function "array_value". /builddir/build/BUILD/bash-4.2/arrayfunc.c:985: alloc_fn: Storage is returned from allocation function "array_value_internal". /builddir/build/BUILD/bash-4.2/arrayfunc.c:921: alloc_fn: Storage is returned from allocation function "quote_string". /builddir/build/BUILD/bash-4.2/subst.c:3555: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:3555: var_assign: Assigning: "result" = "xmalloc(2UL)". /builddir/build/BUILD/bash-4.2/subst.c:3575: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/arrayfunc.c:921: var_assign: Assigning: "retval" = "quote_string(temp)". /builddir/build/BUILD/bash-4.2/arrayfunc.c:974: return_alloc: Returning allocated memory "retval". /builddir/build/BUILD/bash-4.2/arrayfunc.c:985: return_alloc_fn: Directly returning storage allocated by "array_value_internal". /builddir/build/BUILD/bash-4.2/subst.c:6227: var_assign: Assigning: "*valp" = "array_value(varname, 1, flags, NULL, &lind)". /builddir/build/BUILD/bash-4.2/subst.c:6321: noescape: Variable "val" is not freed or pointed-to in function "verify_substring_values". /builddir/build/BUILD/bash-4.2/subst.c:6042:29: noescape: "verify_substring_values" does not free or save its pointer parameter "value". /builddir/build/BUILD/bash-4.2/subst.c:6324: leaked_storage: Variable "val" going out of scope leaks the storage it points to. /builddir/build/BUILD/bash-4.2/subst.c:6332: noescape: Variable "val" is not freed or pointed-to in function "mb_substring". /builddir/build/BUILD/bash-4.2/subst.c:6265:15: noescape: "mb_substring" does not free or save its pointer parameter "string". /builddir/build/BUILD/bash-4.2/subst.c:6374: leaked_storage: Variable "val" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:7239: alloc_fn: Calling allocation function "alloc_word_desc". /builddir/build/BUILD/bash-4.2/make_cmd.c:85: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/make_cmd.c:85: var_assign: Assigning: "temp" = "xmalloc(sizeof (WORD_DESC) /*16*/)". /builddir/build/BUILD/bash-4.2/make_cmd.c:88: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:7239: var_assign: Assigning: "ret" = storage returned from "alloc_word_desc()". /builddir/build/BUILD/bash-4.2/subst.c:7241: overwrite_var: Overwriting "ret" in call "ret = alloc_word_desc()" leaks the storage that "ret" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:6933: alloc_fn: Calling allocation function "string_extract". /builddir/build/BUILD/bash-4.2/subst.c:749: alloc_fn: Storage is returned from allocation function "substring". /builddir/build/BUILD/bash-4.2/stringlib.c:135: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/stringlib.c:135: var_assign: Assigning: "result" = "xmalloc(len + 1)". /builddir/build/BUILD/bash-4.2/stringlib.c:136: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/stringlib.c:138: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:749: var_assign: Assigning: "temp" = "substring(string, *sindex, i)". /builddir/build/BUILD/bash-4.2/subst.c:752: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:6933: var_assign: Assigning: "name" = storage returned from "string_extract(string, &t_index, "}", 2)". /builddir/build/BUILD/bash-4.2/subst.c:7089: noescape: Variable "name" is not freed or pointed-to in function "strlen". /builddir/build/BUILD/bash-4.2/subst.c:7089: noescape: Variable "name" is not freed or pointed-to in function "strcpy". /builddir/build/BUILD/bash-4.2/subst.c:7111: leaked_storage: Variable "name" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:6939: alloc_fn: Calling allocation function "string_extract". /builddir/build/BUILD/bash-4.2/subst.c:749: alloc_fn: Storage is returned from allocation function "substring". /builddir/build/BUILD/bash-4.2/stringlib.c:135: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/stringlib.c:135: var_assign: Assigning: "result" = "xmalloc(len + 1)". /builddir/build/BUILD/bash-4.2/stringlib.c:136: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/stringlib.c:138: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/subst.c:749: var_assign: Assigning: "temp" = "substring(string, *sindex, i)". /builddir/build/BUILD/bash-4.2/subst.c:752: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:6939: var_assign: Assigning: "name" = storage returned from "string_extract(string, &t_index, "#%^,~:-=?+/}", 2)". /builddir/build/BUILD/bash-4.2/subst.c:7089: noescape: Variable "name" is not freed or pointed-to in function "strlen". /builddir/build/BUILD/bash-4.2/subst.c:7089: noescape: Variable "name" is not freed or pointed-to in function "strcpy". /builddir/build/BUILD/bash-4.2/subst.c:7111: leaked_storage: Variable "name" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:7009: alloc_fn: Calling allocation function "xrealloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:74: alloc_fn: Storage is returned from allocation function "realloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:74: var_assign: Assigning: "temp" = "realloc(pointer, bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:78: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:7009: var_assign: Assigning: "name" = storage returned from "xrealloc(name, 3UL)". /builddir/build/BUILD/bash-4.2/subst.c:7089: noescape: Variable "name" is not freed or pointed-to in function "strlen". /builddir/build/BUILD/bash-4.2/subst.c:7089: noescape: Variable "name" is not freed or pointed-to in function "strcpy". /builddir/build/BUILD/bash-4.2/subst.c:7111: leaked_storage: Variable "name" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:6961: alloc_fn: Calling allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:6961: var_assign: Assigning: "name" = storage returned from "xmalloc(3UL + strlen(temp1))". /builddir/build/BUILD/bash-4.2/subst.c:6967: noescape: Variable "name" is not freed or pointed-to in function "strcpy". /builddir/build/BUILD/bash-4.2/subst.c:7089: noescape: Variable "name" is not freed or pointed-to in function "strlen". /builddir/build/BUILD/bash-4.2/subst.c:7089: noescape: Variable "name" is not freed or pointed-to in function "strcpy". /builddir/build/BUILD/bash-4.2/subst.c:7111: leaked_storage: Variable "name" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/redir.c:118: alloc_fn: Calling allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/redir.c:118: var_assign: Assigning: "filename" = storage returned from "strcpy(xmalloc(1UL + strlen(temp->redirector.filename->word)), temp->redirector.filename->word)". /builddir/build/BUILD/bash-4.2/redir.c:118: noescape: Variable "xmalloc(1UL + strlen(temp->redirector.filename->word))" is not freed or pointed-to in function "strcpy". /builddir/build/BUILD/bash-4.2/redir.c:178: noescape: Variable "filename" is not freed or pointed-to in function "internal_error". /builddir/build/BUILD/bash-4.2/redir.c:182: noescape: Variable "filename" is not freed or pointed-to in function "internal_error". /builddir/build/BUILD/bash-4.2/redir.c:187: noescape: Variable "filename" is not freed or pointed-to in function "internal_error". /builddir/build/BUILD/bash-4.2/redir.c:196: noescape: Variable "filename" is not freed or pointed-to in function "internal_error". /builddir/build/BUILD/bash-4.2/redir.c:200: noescape: Variable "filename" is not freed or pointed-to in function "internal_error". /builddir/build/BUILD/bash-4.2/redir.c:205: leaked_storage: Variable "filename" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/execute_cmd.c:3629: alloc_fn: Calling allocation function "search_for_command". /builddir/build/BUILD/bash-4.2/findcmd.c:354: alloc_fn: Storage is returned from allocation function "find_user_command". /builddir/build/BUILD/bash-4.2/findcmd.c:213: alloc_fn: Storage is returned from allocation function "find_user_command_internal". /builddir/build/BUILD/bash-4.2/findcmd.c:268: alloc_fn: Storage is returned from allocation function "_find_user_command_internal". /builddir/build/BUILD/bash-4.2/findcmd.c:244: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/findcmd.c:244: return_alloc_fn: Directly returning storage allocated by "strcpy". /builddir/build/BUILD/bash-4.2/findcmd.c:268: return_alloc_fn: Directly returning storage allocated by "_find_user_command_internal". /builddir/build/BUILD/bash-4.2/findcmd.c:213: return_alloc_fn: Directly returning storage allocated by "find_user_command_internal". /builddir/build/BUILD/bash-4.2/findcmd.c:354: var_assign: Assigning: "command" = "find_user_command(pathname)". /builddir/build/BUILD/bash-4.2/findcmd.c:356: noescape: Variable "command" is not freed or pointed-to in function "phash_insert". /builddir/build/BUILD/bash-4.2/hashcmd.c:93:25: noescape: "phash_insert" does not free or save its pointer parameter "full_path". /builddir/build/BUILD/bash-4.2/findcmd.c:358: return_alloc: Returning allocated memory "command". /builddir/build/BUILD/bash-4.2/execute_cmd.c:3629: var_assign: Assigning: "temp" = storage returned from "search_for_command(pathname)". /builddir/build/BUILD/bash-4.2/execute_cmd.c:3630: noescape: Variable "temp" is not freed or pointed-to in function "file_isdir". /builddir/build/BUILD/bash-4.2/general.c:547:13: noescape: "file_isdir" does not free or save its pointer parameter "fn". /builddir/build/BUILD/bash-4.2/execute_cmd.c:3630: leaked_storage: Variable "temp" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/eval.c:197: alloc_fn: Calling allocation function "get_working_directory". /builddir/build/BUILD/bash-4.2/builtins/common.c:570: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/builtins/common.c:570: return_alloc_fn: Directly returning storage allocated by "strcpy". /builddir/build/BUILD/bash-4.2/eval.c:197: var_assign: Assigning: "pwd" = storage returned from "get_working_directory("eterm")". /builddir/build/BUILD/bash-4.2/eval.c:198: noescape: Variable "pwd" is not freed or pointed-to in function "fprintf". /builddir/build/BUILD/bash-4.2/eval.c:199: leaked_storage: Variable "pwd" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/trap.c:714: alloc_fn: Calling allocation function "save_pipestatus_array". /builddir/build/BUILD/bash-4.2/variables.c:4741: alloc_fn: Storage is returned from allocation function "array_copy". /builddir/build/BUILD/bash-4.2/array.c:138: alloc_fn: Storage is returned from allocation function "array_create". /builddir/build/BUILD/bash-4.2/array.c:89: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/array.c:89: var_assign: Assigning: "r" = "xmalloc(sizeof (ARRAY) /*32*/)". /builddir/build/BUILD/bash-4.2/array.c:96: return_alloc: Returning allocated memory "r". /builddir/build/BUILD/bash-4.2/array.c:138: var_assign: Assigning: "a1" = "array_create()". /builddir/build/BUILD/bash-4.2/array.c:146: return_alloc: Returning allocated memory "a1". /builddir/build/BUILD/bash-4.2/variables.c:4741: var_assign: Assigning: "a2" = "array_copy((ARRAY *)v->value)". /builddir/build/BUILD/bash-4.2/variables.c:4743: return_alloc: Returning allocated memory "a2". /builddir/build/BUILD/bash-4.2/trap.c:714: var_assign: Assigning: "ps" = storage returned from "save_pipestatus_array()". /builddir/build/BUILD/bash-4.2/trap.c:752: leaked_storage: Variable "ps" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/expr.c:1042: alloc_fn: Calling allocation function "get_array_value". /builddir/build/BUILD/bash-4.2/arrayfunc.c:998: alloc_fn: Storage is returned from allocation function "array_value_internal". /builddir/build/BUILD/bash-4.2/arrayfunc.c:921: alloc_fn: Storage is returned from allocation function "quote_string". /builddir/build/BUILD/bash-4.2/subst.c:3555: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:3555: var_assign: Assigning: "result" = "xmalloc(2UL)". /builddir/build/BUILD/bash-4.2/subst.c:3575: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/arrayfunc.c:921: var_assign: Assigning: "retval" = "quote_string(temp)". /builddir/build/BUILD/bash-4.2/arrayfunc.c:974: return_alloc: Returning allocated memory "retval". /builddir/build/BUILD/bash-4.2/arrayfunc.c:998: return_alloc_fn: Directly returning storage allocated by "array_value_internal". /builddir/build/BUILD/bash-4.2/expr.c:1042: var_assign: Assigning: "value" = storage returned from "get_array_value(tok, 0, NULL, &ind)". /builddir/build/BUILD/bash-4.2/expr.c:1057: leaked_storage: Variable "value" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/arrayfunc.c:654: alloc_fn: Calling allocation function "expand_assignment_string_to_string". /builddir/build/BUILD/bash-4.2/subst.c:3103: alloc_fn: Storage is returned from allocation function "expand_string_to_string_internal". /builddir/build/BUILD/bash-4.2/subst.c:3073: alloc_fn: Storage is returned from allocation function "string_list". /builddir/build/BUILD/bash-4.2/subst.c:2159: alloc_fn: Storage is returned from allocation function "string_list_internal". /builddir/build/BUILD/bash-4.2/subst.c:2116: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:2116: return_alloc_fn: Directly returning storage allocated by "strcpy". /builddir/build/BUILD/bash-4.2/subst.c:2159: return_alloc_fn: Directly returning storage allocated by "string_list_internal". /builddir/build/BUILD/bash-4.2/subst.c:3073: var_assign: Assigning: "ret" = "string_list(list)". /builddir/build/BUILD/bash-4.2/subst.c:3079: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/subst.c:3103: return_alloc_fn: Directly returning storage allocated by "expand_string_to_string_internal". /builddir/build/BUILD/bash-4.2/arrayfunc.c:654: var_assign: Assigning: "akey" = storage returned from "expand_assignment_string_to_string(sub, 0)". /builddir/build/BUILD/bash-4.2/arrayfunc.c:658: leaked_storage: Variable "akey" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/subst.c:1952: alloc_fn: Calling allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/subst.c:1952: var_assign: Assigning: "d2" = storage returned from "xmalloc(slength + 1UL)". /builddir/build/BUILD/bash-4.2/subst.c:1964: noescape: Variable "d2" is not freed or pointed-to in function "memcpy". /builddir/build/BUILD/bash-4.2/subst.c:1987: leaked_storage: Variable "d2" going out of scope leaks the storage it points to. /builddir/build/BUILD/bash-4.2/subst.c:2072: leaked_storage: Variable "d2" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/pcomplete.c:1363: alloc_fn: Calling allocation function "filter_stringlist". /builddir/build/BUILD/bash-4.2/pcomplete.c:294: alloc_fn: Storage is returned from allocation function "strlist_create". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:46: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:46: var_assign: Assigning: "ret" = "xmalloc(sizeof (STRINGLIST) /*16*/)". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:60: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/pcomplete.c:294: var_assign: Assigning: "ret" = "strlist_create(sl->list_size)". /builddir/build/BUILD/bash-4.2/pcomplete.c:308: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/pcomplete.c:1363: var_assign: Assigning: "tmatches" = storage returned from "filter_stringlist(ret, cs->filterpat, word)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1377: var_assign: Assigning: "ret" = "tmatches". /builddir/build/BUILD/bash-4.2/pcomplete.c:1381: noescape: Variable "ret" is not freed or pointed-to in function "strlist_prefix_suffix". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:192:24: noescape: "strlist_prefix_suffix" does not free or save its pointer parameter "sl". /builddir/build/BUILD/bash-4.2/pcomplete.c:1381: overwrite_var: Overwriting "ret" in call "ret = strlist_prefix_suffix(ret, cs->prefix, cs->suffix)" leaks the storage that "ret" points to. /builddir/build/BUILD/bash-4.2/pcomplete.c:1381: var_assign: Assigning: "ret" = storage returned from "strlist_prefix_suffix(ret, cs->prefix, cs->suffix)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1391: overwrite_var: Overwriting "ret" in call "ret = gen_action_completions(tcs, word)" leaks the storage that "ret" points to. /builddir/build/BUILD/bash-4.2/pcomplete.c:1404: leaked_storage: Variable "tmatches" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/pcomplete.c:1252: alloc_fn: Calling allocation function "strlist_append". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:174: alloc_fn: Storage is returned from allocation function "strlist_copy". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:129: alloc_fn: Storage is returned from allocation function "strlist_create". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:46: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:46: var_assign: Assigning: "ret" = "xmalloc(sizeof (STRINGLIST) /*16*/)". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:60: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:129: var_assign: Assigning: "new" = "strlist_create(sl->list_size)". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:141: return_alloc: Returning allocated memory "new". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:174: return_alloc_fn: Directly returning storage allocated by "strlist_copy". /builddir/build/BUILD/bash-4.2/pcomplete.c:1252: var_assign: Assigning: "ret" = storage returned from "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1340: noescape: Variable "ret" is not freed or pointed-to in function "strlist_append". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:168:17: noescape: "strlist_append" does not free or save its pointer parameter "m1". /builddir/build/BUILD/bash-4.2/pcomplete.c:1340: overwrite_var: Overwriting "ret" in call "ret = strlist_append(ret, tmatches)" leaks the storage that "ret" points to. /builddir/build/BUILD/bash-4.2/pcomplete.c:1340: var_assign: Assigning: "ret" = storage returned from "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1381: noescape: Variable "ret" is not freed or pointed-to in function "strlist_prefix_suffix". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:192:24: noescape: "strlist_prefix_suffix" does not free or save its pointer parameter "sl". /builddir/build/BUILD/bash-4.2/pcomplete.c:1381: overwrite_var: Overwriting "ret" in call "ret = strlist_prefix_suffix(ret, cs->prefix, cs->suffix)" leaks the storage that "ret" points to. /builddir/build/BUILD/bash-4.2/pcomplete.c:1381: var_assign: Assigning: "ret" = storage returned from "strlist_prefix_suffix(ret, cs->prefix, cs->suffix)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1391: overwrite_var: Overwriting "ret" in call "ret = gen_action_completions(tcs, word)" leaks the storage that "ret" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/pcomplete.c:1508: alloc_fn: Calling allocation function "gen_progcomp_completions". /builddir/build/BUILD/bash-4.2/pcomplete.c:1466: alloc_fn: Storage is returned from allocation function "gen_compspec_completions". /builddir/build/BUILD/bash-4.2/pcomplete.c:1252: alloc_fn: Storage is returned from allocation function "strlist_append". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:174: alloc_fn: Storage is returned from allocation function "strlist_copy". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:129: alloc_fn: Storage is returned from allocation function "strlist_create". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:46: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:46: var_assign: Assigning: "ret" = "xmalloc(sizeof (STRINGLIST) /*16*/)". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:60: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:129: var_assign: Assigning: "new" = "strlist_create(sl->list_size)". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:141: return_alloc: Returning allocated memory "new". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:174: return_alloc_fn: Directly returning storage allocated by "strlist_copy". /builddir/build/BUILD/bash-4.2/pcomplete.c:1252: var_assign: Assigning: "ret" = "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1340: noescape: Variable "ret" is not freed or pointed-to in function "strlist_append". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:168:17: noescape: "strlist_append" does not free or save its pointer parameter "m1". /builddir/build/BUILD/bash-4.2/pcomplete.c:1340: var_assign: Assigning: "ret" = "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1363: noescape: Variable "ret" is not freed or pointed-to in function "filter_stringlist". /builddir/build/BUILD/bash-4.2/pcomplete.c:278:20: noescape: "filter_stringlist" does not free or save its pointer parameter "sl". /builddir/build/BUILD/bash-4.2/pcomplete.c:1363: var_assign: Assigning: "tmatches" = "filter_stringlist(ret, cs->filterpat, word)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1377: var_assign: Assigning: "ret" = "tmatches". /builddir/build/BUILD/bash-4.2/pcomplete.c:1381: noescape: Variable "ret" is not freed or pointed-to in function "strlist_prefix_suffix". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:192:24: noescape: "strlist_prefix_suffix" does not free or save its pointer parameter "sl". /builddir/build/BUILD/bash-4.2/pcomplete.c:1381: var_assign: Assigning: "ret" = "strlist_prefix_suffix(ret, cs->prefix, cs->suffix)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1399: noescape: Variable "ret" is not freed or pointed-to in function "strlist_append". /builddir/build/BUILD/bash-4.2/pcomplete.c:1399: var_assign: Assigning: "ret" = "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1404: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/pcomplete.c:1466: var_assign: Assigning: "ret" = "gen_compspec_completions(cs, cmd, word, start, end, foundp)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1482: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/pcomplete.c:1508: var_assign: Assigning: "ret" = storage returned from "gen_progcomp_completions(cmd, cmd, word, start, end, &found, &retry, &lastcs)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1517: overwrite_var: Overwriting "ret" in call "ret = gen_progcomp_completions("_DefaultCmD_", cmd, word, start, end, &found, &retry, &lastcs)" leaks the storage that "ret" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/pcomplete.c:1508: alloc_fn: Calling allocation function "gen_progcomp_completions". /builddir/build/BUILD/bash-4.2/pcomplete.c:1466: alloc_fn: Storage is returned from allocation function "gen_compspec_completions". /builddir/build/BUILD/bash-4.2/pcomplete.c:1252: alloc_fn: Storage is returned from allocation function "strlist_append". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:174: alloc_fn: Storage is returned from allocation function "strlist_copy". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:129: alloc_fn: Storage is returned from allocation function "strlist_create". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:46: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:46: var_assign: Assigning: "ret" = "xmalloc(sizeof (STRINGLIST) /*16*/)". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:60: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:129: var_assign: Assigning: "new" = "strlist_create(sl->list_size)". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:141: return_alloc: Returning allocated memory "new". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:174: return_alloc_fn: Directly returning storage allocated by "strlist_copy". /builddir/build/BUILD/bash-4.2/pcomplete.c:1252: var_assign: Assigning: "ret" = "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1340: noescape: Variable "ret" is not freed or pointed-to in function "strlist_append". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:168:17: noescape: "strlist_append" does not free or save its pointer parameter "m1". /builddir/build/BUILD/bash-4.2/pcomplete.c:1340: var_assign: Assigning: "ret" = "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1363: noescape: Variable "ret" is not freed or pointed-to in function "filter_stringlist". /builddir/build/BUILD/bash-4.2/pcomplete.c:278:20: noescape: "filter_stringlist" does not free or save its pointer parameter "sl". /builddir/build/BUILD/bash-4.2/pcomplete.c:1363: var_assign: Assigning: "tmatches" = "filter_stringlist(ret, cs->filterpat, word)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1377: var_assign: Assigning: "ret" = "tmatches". /builddir/build/BUILD/bash-4.2/pcomplete.c:1381: noescape: Variable "ret" is not freed or pointed-to in function "strlist_prefix_suffix". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:192:24: noescape: "strlist_prefix_suffix" does not free or save its pointer parameter "sl". /builddir/build/BUILD/bash-4.2/pcomplete.c:1381: var_assign: Assigning: "ret" = "strlist_prefix_suffix(ret, cs->prefix, cs->suffix)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1399: noescape: Variable "ret" is not freed or pointed-to in function "strlist_append". /builddir/build/BUILD/bash-4.2/pcomplete.c:1399: var_assign: Assigning: "ret" = "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1404: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/pcomplete.c:1466: var_assign: Assigning: "ret" = "gen_compspec_completions(cs, cmd, word, start, end, foundp)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1482: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/pcomplete.c:1508: var_assign: Assigning: "ret" = storage returned from "gen_progcomp_completions(cmd, cmd, word, start, end, &found, &retry, &lastcs)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1508: overwrite_var: Overwriting "ret" in call "ret = gen_progcomp_completions(cmd, cmd, word, start, end, &found, &retry, &lastcs)" leaks the storage that "ret" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/pcomplete.c:1513: alloc_fn: Calling allocation function "gen_progcomp_completions". /builddir/build/BUILD/bash-4.2/pcomplete.c:1466: alloc_fn: Storage is returned from allocation function "gen_compspec_completions". /builddir/build/BUILD/bash-4.2/pcomplete.c:1252: alloc_fn: Storage is returned from allocation function "strlist_append". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:174: alloc_fn: Storage is returned from allocation function "strlist_copy". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:129: alloc_fn: Storage is returned from allocation function "strlist_create". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:46: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:46: var_assign: Assigning: "ret" = "xmalloc(sizeof (STRINGLIST) /*16*/)". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:60: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:129: var_assign: Assigning: "new" = "strlist_create(sl->list_size)". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:141: return_alloc: Returning allocated memory "new". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:174: return_alloc_fn: Directly returning storage allocated by "strlist_copy". /builddir/build/BUILD/bash-4.2/pcomplete.c:1252: var_assign: Assigning: "ret" = "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1340: noescape: Variable "ret" is not freed or pointed-to in function "strlist_append". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:168:17: noescape: "strlist_append" does not free or save its pointer parameter "m1". /builddir/build/BUILD/bash-4.2/pcomplete.c:1340: var_assign: Assigning: "ret" = "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1363: noescape: Variable "ret" is not freed or pointed-to in function "filter_stringlist". /builddir/build/BUILD/bash-4.2/pcomplete.c:278:20: noescape: "filter_stringlist" does not free or save its pointer parameter "sl". /builddir/build/BUILD/bash-4.2/pcomplete.c:1363: var_assign: Assigning: "tmatches" = "filter_stringlist(ret, cs->filterpat, word)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1377: var_assign: Assigning: "ret" = "tmatches". /builddir/build/BUILD/bash-4.2/pcomplete.c:1381: noescape: Variable "ret" is not freed or pointed-to in function "strlist_prefix_suffix". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:192:24: noescape: "strlist_prefix_suffix" does not free or save its pointer parameter "sl". /builddir/build/BUILD/bash-4.2/pcomplete.c:1381: var_assign: Assigning: "ret" = "strlist_prefix_suffix(ret, cs->prefix, cs->suffix)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1399: noescape: Variable "ret" is not freed or pointed-to in function "strlist_append". /builddir/build/BUILD/bash-4.2/pcomplete.c:1399: var_assign: Assigning: "ret" = "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1404: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/pcomplete.c:1466: var_assign: Assigning: "ret" = "gen_compspec_completions(cs, cmd, word, start, end, foundp)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1482: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/pcomplete.c:1513: var_assign: Assigning: "ret" = storage returned from "gen_progcomp_completions(t, cmd, word, start, end, &found, &retry, &lastcs)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1517: overwrite_var: Overwriting "ret" in call "ret = gen_progcomp_completions("_DefaultCmD_", cmd, word, start, end, &found, &retry, &lastcs)" leaks the storage that "ret" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/pcomplete.c:1513: alloc_fn: Calling allocation function "gen_progcomp_completions". /builddir/build/BUILD/bash-4.2/pcomplete.c:1466: alloc_fn: Storage is returned from allocation function "gen_compspec_completions". /builddir/build/BUILD/bash-4.2/pcomplete.c:1252: alloc_fn: Storage is returned from allocation function "strlist_append". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:174: alloc_fn: Storage is returned from allocation function "strlist_copy". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:129: alloc_fn: Storage is returned from allocation function "strlist_create". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:46: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:46: var_assign: Assigning: "ret" = "xmalloc(sizeof (STRINGLIST) /*16*/)". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:60: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:129: var_assign: Assigning: "new" = "strlist_create(sl->list_size)". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:141: return_alloc: Returning allocated memory "new". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:174: return_alloc_fn: Directly returning storage allocated by "strlist_copy". /builddir/build/BUILD/bash-4.2/pcomplete.c:1252: var_assign: Assigning: "ret" = "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1340: noescape: Variable "ret" is not freed or pointed-to in function "strlist_append". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:168:17: noescape: "strlist_append" does not free or save its pointer parameter "m1". /builddir/build/BUILD/bash-4.2/pcomplete.c:1340: var_assign: Assigning: "ret" = "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1363: noescape: Variable "ret" is not freed or pointed-to in function "filter_stringlist". /builddir/build/BUILD/bash-4.2/pcomplete.c:278:20: noescape: "filter_stringlist" does not free or save its pointer parameter "sl". /builddir/build/BUILD/bash-4.2/pcomplete.c:1363: var_assign: Assigning: "tmatches" = "filter_stringlist(ret, cs->filterpat, word)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1377: var_assign: Assigning: "ret" = "tmatches". /builddir/build/BUILD/bash-4.2/pcomplete.c:1381: noescape: Variable "ret" is not freed or pointed-to in function "strlist_prefix_suffix". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:192:24: noescape: "strlist_prefix_suffix" does not free or save its pointer parameter "sl". /builddir/build/BUILD/bash-4.2/pcomplete.c:1381: var_assign: Assigning: "ret" = "strlist_prefix_suffix(ret, cs->prefix, cs->suffix)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1399: noescape: Variable "ret" is not freed or pointed-to in function "strlist_append". /builddir/build/BUILD/bash-4.2/pcomplete.c:1399: var_assign: Assigning: "ret" = "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1404: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/pcomplete.c:1466: var_assign: Assigning: "ret" = "gen_compspec_completions(cs, cmd, word, start, end, foundp)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1482: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/pcomplete.c:1513: var_assign: Assigning: "ret" = storage returned from "gen_progcomp_completions(t, cmd, word, start, end, &found, &retry, &lastcs)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1508: overwrite_var: Overwriting "ret" in call "ret = gen_progcomp_completions(cmd, cmd, word, start, end, &found, &retry, &lastcs)" leaks the storage that "ret" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/pcomplete.c:1517: alloc_fn: Calling allocation function "gen_progcomp_completions". /builddir/build/BUILD/bash-4.2/pcomplete.c:1466: alloc_fn: Storage is returned from allocation function "gen_compspec_completions". /builddir/build/BUILD/bash-4.2/pcomplete.c:1252: alloc_fn: Storage is returned from allocation function "strlist_append". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:174: alloc_fn: Storage is returned from allocation function "strlist_copy". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:129: alloc_fn: Storage is returned from allocation function "strlist_create". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:46: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:46: var_assign: Assigning: "ret" = "xmalloc(sizeof (STRINGLIST) /*16*/)". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:60: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:129: var_assign: Assigning: "new" = "strlist_create(sl->list_size)". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:141: return_alloc: Returning allocated memory "new". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:174: return_alloc_fn: Directly returning storage allocated by "strlist_copy". /builddir/build/BUILD/bash-4.2/pcomplete.c:1252: var_assign: Assigning: "ret" = "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1340: noescape: Variable "ret" is not freed or pointed-to in function "strlist_append". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:168:17: noescape: "strlist_append" does not free or save its pointer parameter "m1". /builddir/build/BUILD/bash-4.2/pcomplete.c:1340: var_assign: Assigning: "ret" = "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1363: noescape: Variable "ret" is not freed or pointed-to in function "filter_stringlist". /builddir/build/BUILD/bash-4.2/pcomplete.c:278:20: noescape: "filter_stringlist" does not free or save its pointer parameter "sl". /builddir/build/BUILD/bash-4.2/pcomplete.c:1363: var_assign: Assigning: "tmatches" = "filter_stringlist(ret, cs->filterpat, word)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1377: var_assign: Assigning: "ret" = "tmatches". /builddir/build/BUILD/bash-4.2/pcomplete.c:1381: noescape: Variable "ret" is not freed or pointed-to in function "strlist_prefix_suffix". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:192:24: noescape: "strlist_prefix_suffix" does not free or save its pointer parameter "sl". /builddir/build/BUILD/bash-4.2/pcomplete.c:1381: var_assign: Assigning: "ret" = "strlist_prefix_suffix(ret, cs->prefix, cs->suffix)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1399: noescape: Variable "ret" is not freed or pointed-to in function "strlist_append". /builddir/build/BUILD/bash-4.2/pcomplete.c:1399: var_assign: Assigning: "ret" = "strlist_append(ret, tmatches)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1404: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/pcomplete.c:1466: var_assign: Assigning: "ret" = "gen_compspec_completions(cs, cmd, word, start, end, foundp)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1482: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/pcomplete.c:1517: var_assign: Assigning: "ret" = storage returned from "gen_progcomp_completions("_DefaultCmD_", cmd, word, start, end, &found, &retry, &lastcs)". /builddir/build/BUILD/bash-4.2/pcomplete.c:1508: overwrite_var: Overwriting "ret" in call "ret = gen_progcomp_completions(cmd, cmd, word, start, end, &found, &retry, &lastcs)" leaks the storage that "ret" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/bashline.c:2664: alloc_fn: Calling allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/bashline.c:2664: noescape: Variable "xmalloc(1UL + strlen(*dirname))" is not freed or pointed-to in function "strcpy". /builddir/build/BUILD/bash-4.2/bashline.c:2664: var_assign: Assigning: "d" = storage returned from "strcpy(xmalloc(1UL + strlen(*dirname)), *dirname)". /builddir/build/BUILD/bash-4.2/bashline.c:2680: leaked_storage: Variable "d" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/bashline.c:3641: alloc_fn: Calling allocation function "substring". /builddir/build/BUILD/bash-4.2/stringlib.c:135: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/stringlib.c:135: var_assign: Assigning: "result" = "xmalloc(len + 1)". /builddir/build/BUILD/bash-4.2/stringlib.c:136: noescape: Variable "result" is not freed or pointed-to in function "strncpy". /builddir/build/BUILD/bash-4.2/stringlib.c:138: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/bashline.c:3641: var_assign: Assigning: "kseq" = storage returned from "substring(line, kstart, i)". /builddir/build/BUILD/bash-4.2/bashline.c:3648: leaked_storage: Variable "kseq" going out of scope leaks the storage it points to. /builddir/build/BUILD/bash-4.2/bashline.c:3653: leaked_storage: Variable "kseq" going out of scope leaks the storage it points to. /builddir/build/BUILD/bash-4.2/bashline.c:3659: noescape: Variable "kseq" is not freed or pointed-to in function "rl_generic_bind". /builddir/build/BUILD/bash-4.2/lib/readline/bind.c:332:24: noescape: "rl_generic_bind" does not free or save its pointer parameter "keyseq". /builddir/build/BUILD/bash-4.2/bashline.c:3663: noescape: Variable "kseq" is not freed or pointed-to in function "rl_bind_keyseq_in_map". /builddir/build/BUILD/bash-4.2/lib/readline/bind.c:252:24: noescape: "rl_bind_keyseq_in_map" does not free or save its pointer parameter "keyseq". /builddir/build/BUILD/bash-4.2/bashline.c:3665: leaked_storage: Variable "kseq" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/lib/readline/bind.c:2113: alloc_fn: Calling allocation function "rl_funmap_names". /builddir/build/BUILD/bash-4.2/lib/readline/funmap.c:254: alloc_fn: Storage is returned from allocation function "xrealloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:74: alloc_fn: Storage is returned from allocation function "realloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:74: var_assign: Assigning: "temp" = "realloc(pointer, bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:78: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/lib/readline/funmap.c:254: var_assign: Assigning: "result" = "xrealloc(result, result_size * sizeof (char *) /*8*/)". /builddir/build/BUILD/bash-4.2/lib/readline/funmap.c:261: noescape: Variable "result" is not freed or pointed-to in function "qsort". /builddir/build/BUILD/bash-4.2/lib/readline/funmap.c:262: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/lib/readline/bind.c:2113: var_assign: Assigning: "names" = storage returned from "rl_funmap_names()". /builddir/build/BUILD/bash-4.2/lib/readline/bind.c:2170: leaked_storage: Variable "names" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/builtins/cd.def:494: alloc_fn: Calling allocation function "resetpwd". /builddir/build/BUILD/bash-4.2/builtins/cd.def:172: alloc_fn: Storage is returned from allocation function "get_working_directory". /builddir/build/BUILD/bash-4.2/builtins/common.c:570: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/builtins/common.c:570: return_alloc_fn: Directly returning storage allocated by "strcpy". /builddir/build/BUILD/bash-4.2/builtins/cd.def:172: var_assign: Assigning: "tdir" = "get_working_directory(caller)". /builddir/build/BUILD/bash-4.2/builtins/cd.def:173: return_alloc: Returning allocated memory "tdir". /builddir/build/BUILD/bash-4.2/builtins/cd.def:494: var_assign: Assigning: "t" = storage returned from "resetpwd("cd")". /builddir/build/BUILD/bash-4.2/builtins/cd.def:502: leaked_storage: Variable "t" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/builtins/cd.def:336: alloc_fn: Calling allocation function "dirspell". /builddir/build/BUILD/bash-4.2/lib/sh/spell.c:198: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/sh/spell.c:198: var_assign: Assigning: "guess" = "malloc(n)". /builddir/build/BUILD/bash-4.2/lib/sh/spell.c:202: noescape: Variable "guess" is not freed or pointed-to in function "spname". /builddir/build/BUILD/bash-4.2/lib/sh/spell.c:62:17: noescape: "spname" does not free or save its pointer parameter "newname". /builddir/build/BUILD/bash-4.2/lib/sh/spell.c:210: return_alloc: Returning allocated memory "guess". /builddir/build/BUILD/bash-4.2/builtins/cd.def:336: var_assign: Assigning: "temp" = storage returned from "dirspell(dirname)". /builddir/build/BUILD/bash-4.2/builtins/cd.def:337: noescape: Variable "temp" is not freed or pointed-to in function "change_to_directory". /builddir/build/BUILD/bash-4.2/builtins/cd.def:434:22: noescape: "change_to_directory" does not free or save its pointer parameter "newdir". /builddir/build/BUILD/bash-4.2/builtins/cd.def:339: noescape: Variable "temp" is not freed or pointed-to in function "printf". /builddir/build/BUILD/bash-4.2/builtins/cd.def:340: leaked_storage: Variable "temp" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/builtins/cd.def:401: alloc_fn: Calling allocation function "get_working_directory". /builddir/build/BUILD/bash-4.2/builtins/common.c:570: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/builtins/common.c:570: return_alloc_fn: Directly returning storage allocated by "strcpy". /builddir/build/BUILD/bash-4.2/builtins/cd.def:401: var_assign: Assigning: "directory" = storage returned from "get_working_directory("pwd")". /builddir/build/BUILD/bash-4.2/builtins/cd.def:408: overwrite_var: Overwriting "directory" in call "directory = resetpwd("pwd")" leaks the storage that "directory" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/builtins/cd.def:401: alloc_fn: Calling allocation function "sh_physpath". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:92: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:92: var_assign: Assigning: "result" = "xmalloc(4097UL)". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:92: var_assign: Assigning: "q" = "result". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:118: var_assign: Assigning: "qbase" = "q". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:147: var_assign: Assigning: "qsave" = "q". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:167: noescape: Variable "result" is not freed or pointed-to in function "_path_readlink". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:52:17: noescape: "_path_readlink" does not free or save its pointer parameter "path". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:215: var_assign: Assigning: "q" = "result". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:227: var_assign: Assigning: "qbase" = "q". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:147: var_assign: Assigning: "qsave" = "q". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:167: noescape: Variable "result" is not freed or pointed-to in function "_path_readlink". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:215: var_assign: Assigning: "q" = "result". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:227: var_assign: Assigning: "qbase" = "q". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:147: var_assign: Assigning: "qsave" = "q". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:167: noescape: Variable "result" is not freed or pointed-to in function "_path_readlink". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:232: var_assign: Assigning: "q" = "qsave". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:147: var_assign: Assigning: "qsave" = "q". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:167: noescape: Variable "result" is not freed or pointed-to in function "_path_readlink". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:147: var_assign: Assigning: "qsave" = "q". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:167: noescape: Variable "result" is not freed or pointed-to in function "_path_readlink". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:215: var_assign: Assigning: "q" = "result". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:227: var_assign: Assigning: "qbase" = "q". /builddir/build/BUILD/bash-4.2/lib/sh/pathphys.c:251: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/builtins/cd.def:401: var_assign: Assigning: "directory" = storage returned from "sh_physpath(the_current_working_directory, 0)". /builddir/build/BUILD/bash-4.2/builtins/cd.def:408: overwrite_var: Overwriting "directory" in call "directory = resetpwd("pwd")" leaks the storage that "directory" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/builtins/type.def:350: alloc_fn: Calling allocation function "find_user_command". /builddir/build/BUILD/bash-4.2/findcmd.c:213: alloc_fn: Storage is returned from allocation function "find_user_command_internal". /builddir/build/BUILD/bash-4.2/findcmd.c:268: alloc_fn: Storage is returned from allocation function "_find_user_command_internal". /builddir/build/BUILD/bash-4.2/findcmd.c:244: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/findcmd.c:244: return_alloc_fn: Directly returning storage allocated by "strcpy". /builddir/build/BUILD/bash-4.2/findcmd.c:268: return_alloc_fn: Directly returning storage allocated by "_find_user_command_internal". /builddir/build/BUILD/bash-4.2/findcmd.c:213: return_alloc_fn: Directly returning storage allocated by "find_user_command_internal". /builddir/build/BUILD/bash-4.2/builtins/type.def:350: var_assign: Assigning: "full_path" = storage returned from "find_user_command(command)". /builddir/build/BUILD/bash-4.2/builtins/type.def:363: noescape: Variable "full_path" is not freed or pointed-to in function "strcmp". /builddir/build/BUILD/bash-4.2/builtins/type.def:383: noescape: Variable "full_path" is not freed or pointed-to in function "sh_makepath". /builddir/build/BUILD/bash-4.2/lib/sh/makepath.c:70:20: noescape: "sh_makepath" does not free or save its pointer parameter "dir". /builddir/build/BUILD/bash-4.2/builtins/type.def:383: overwrite_var: Overwriting "full_path" in call "full_path = sh_makepath(NULL, full_path, 6)" leaks the storage that "full_path" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/builtins/complete.def:722: alloc_fn: Calling allocation function "completions_to_stringlist". /builddir/build/BUILD/bash-4.2/pcomplete.c:322: alloc_fn: Storage is returned from allocation function "strlist_create". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:46: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:46: var_assign: Assigning: "ret" = "xmalloc(sizeof (STRINGLIST) /*16*/)". /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:60: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/bash-4.2/pcomplete.c:322: var_assign: Assigning: "sl" = "strlist_create(mlen + 1)". /builddir/build/BUILD/bash-4.2/pcomplete.c:325: return_alloc: Returning allocated memory "sl". /builddir/build/BUILD/bash-4.2/builtins/complete.def:722: var_assign: Assigning: "sl" = storage returned from "completions_to_stringlist(matches)". /builddir/build/BUILD/bash-4.2/builtins/complete.def:731: overwrite_var: Overwriting "sl" in call "sl = completions_to_stringlist(matches)" leaks the storage that "sl" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/builtins/fc.def:377: alloc_arg: Calling allocation function "sh_mktmpfp" on "fn". /builddir/build/BUILD/bash-4.2/lib/sh/tmpfile.c:213: alloc_arg: "sh_mktmpfd" opens handle stored into "*namep". /builddir/build/BUILD/bash-4.2/lib/sh/tmpfile.c:164: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/lib/sh/tmpfile.c:164: var_assign: Assigning: "filename" = "xmalloc(4097UL)". /builddir/build/BUILD/bash-4.2/lib/sh/tmpfile.c:188: noescape: Variable "filename" is not freed or pointed-to in function "sprintf". /builddir/build/BUILD/bash-4.2/lib/sh/tmpfile.c:191: noescape: Variable "filename" is not freed or pointed-to in function "open". /builddir/build/BUILD/bash-4.2/lib/sh/tmpfile.c:188: noescape: Variable "filename" is not freed or pointed-to in function "sprintf". /builddir/build/BUILD/bash-4.2/lib/sh/tmpfile.c:191: noescape: Variable "filename" is not freed or pointed-to in function "open". /builddir/build/BUILD/bash-4.2/lib/sh/tmpfile.c:196: var_assign: Assigning: "*namep" = "filename". /builddir/build/BUILD/bash-4.2/builtins/fc.def:409: leaked_storage: Variable "fn" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/builtins/hash.def:264: alloc_fn: Calling allocation function "phash_search". /builddir/build/BUILD/bash-4.2/hashcmd.c:191: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/hashcmd.c:191: return_alloc_fn: Directly returning storage allocated by "strcpy". /builddir/build/BUILD/bash-4.2/builtins/hash.def:264: var_assign: Assigning: "target" = storage returned from "phash_search(l->word->word)". /builddir/build/BUILD/bash-4.2/builtins/hash.def:272: noescape: Variable "target" is not freed or pointed-to in function "printf". /builddir/build/BUILD/bash-4.2/builtins/hash.def:264: overwrite_var: Overwriting "target" in call "target = phash_search(l->word->word)" leaks the storage that "target" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/builtins/hash.def:264: alloc_fn: Calling allocation function "phash_search". /builddir/build/BUILD/bash-4.2/hashcmd.c:191: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/hashcmd.c:191: return_alloc_fn: Directly returning storage allocated by "strcpy". /builddir/build/BUILD/bash-4.2/builtins/hash.def:264: var_assign: Assigning: "target" = storage returned from "phash_search(l->word->word)". /builddir/build/BUILD/bash-4.2/builtins/hash.def:272: noescape: Variable "target" is not freed or pointed-to in function "printf". /builddir/build/BUILD/bash-4.2/builtins/hash.def:281: leaked_storage: Variable "target" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/builtins/mkbuiltins.c:508: alloc_fn: Calling allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/builtins/mkbuiltins.c:1005: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/builtins/mkbuiltins.c:1005: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/builtins/mkbuiltins.c:1009: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/builtins/mkbuiltins.c:508: var_assign: Assigning: "buffer" = storage returned from "xmalloc(1UL + file_size)". /builddir/build/BUILD/bash-4.2/builtins/mkbuiltins.c:510: noescape: Variable "buffer" is not freed or pointed-to in function "read". /builddir/build/BUILD/bash-4.2/builtins/mkbuiltins.c:522: leaked_storage: Variable "buffer" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/make_cmd.c:304: alloc_fn: Calling allocation function "make_arith_for_expr". /builddir/build/BUILD/bash-4.2/make_cmd.c:264: alloc_fn: Storage is returned from allocation function "make_word_list". /builddir/build/BUILD/bash-4.2/make_cmd.c:172: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/make_cmd.c:172: var_assign: Assigning: "temp" = "xmalloc(sizeof (WORD_LIST) /*16*/)". /builddir/build/BUILD/bash-4.2/make_cmd.c:176: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/make_cmd.c:264: var_assign: Assigning: "result" = "make_word_list(wd, NULL)". /builddir/build/BUILD/bash-4.2/make_cmd.c:265: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/make_cmd.c:304: var_assign: Assigning: "init" = storage returned from "make_arith_for_expr(t)". /builddir/build/BUILD/bash-4.2/make_cmd.c:328: leaked_storage: Variable "init" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/make_cmd.c:310: alloc_fn: Calling allocation function "make_arith_for_expr". /builddir/build/BUILD/bash-4.2/make_cmd.c:264: alloc_fn: Storage is returned from allocation function "make_word_list". /builddir/build/BUILD/bash-4.2/make_cmd.c:172: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/make_cmd.c:172: var_assign: Assigning: "temp" = "xmalloc(sizeof (WORD_LIST) /*16*/)". /builddir/build/BUILD/bash-4.2/make_cmd.c:176: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/make_cmd.c:264: var_assign: Assigning: "result" = "make_word_list(wd, NULL)". /builddir/build/BUILD/bash-4.2/make_cmd.c:265: return_alloc: Returning allocated memory "result". /builddir/build/BUILD/bash-4.2/make_cmd.c:310: var_assign: Assigning: "step" = storage returned from "make_arith_for_expr(t)". /builddir/build/BUILD/bash-4.2/make_cmd.c:310: overwrite_var: Overwriting "step" in call "step = make_arith_for_expr(t)" leaks the storage that "step" points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/pcomplete.c:354: alloc_fn: Calling allocation function "all_aliases". /builddir/build/BUILD/bash-4.2/alias.c:263: alloc_fn: Storage is returned from allocation function "map_over_aliases". /builddir/build/BUILD/bash-4.2/alias.c:218: alloc_fn: Storage is returned from allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/alias.c:218: var_assign: Assigning: "list" = "xmalloc((i + 1) * sizeof (alias_t *) /*8*/)". /builddir/build/BUILD/bash-4.2/alias.c:232: return_alloc: Returning allocated memory "list". /builddir/build/BUILD/bash-4.2/alias.c:263: var_assign: Assigning: "list" = "map_over_aliases(NULL)". /builddir/build/BUILD/bash-4.2/alias.c:265: noescape: Variable "list" is not freed or pointed-to in function "sort_aliases". /builddir/build/BUILD/bash-4.2/alias.c:236:15: noescape: "sort_aliases" does not free or save its pointer parameter "array". /builddir/build/BUILD/bash-4.2/alias.c:266: return_alloc: Returning allocated memory "list". /builddir/build/BUILD/bash-4.2/pcomplete.c:354: var_assign: Assigning: "alias_list" = storage returned from "all_aliases()". /builddir/build/BUILD/bash-4.2/pcomplete.c:371: leaked_storage: Variable "alias_list" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK (CWE-404): /builddir/build/BUILD/bash-4.2/shell.c:1807: alloc_fn: Calling allocation function "xmalloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: alloc_fn: Storage is returned from allocation function "malloc". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_alloc: Returning allocated memory "temp". /builddir/build/BUILD/bash-4.2/shell.c:1807: noescape: Variable "xmalloc(1UL + strlen((shell_builtins + i).short_doc))" is not freed or pointed-to in function "strcpy". /builddir/build/BUILD/bash-4.2/shell.c:1807: var_assign: Assigning: "set_opts" = storage returned from "strcpy(xmalloc(1UL + strlen((shell_builtins + i).short_doc)), (shell_builtins + i).short_doc)". /builddir/build/BUILD/bash-4.2/shell.c:1807: overwrite_var: Overwriting "set_opts" in call "set_opts = (char *)strcpy(xmalloc(1UL + strlen((shell_builtins + i).short_doc)), (shell_builtins + i).short_doc)" leaks the storage that "set_opts" points to. Error: REVERSE_INULL (CWE-476): /builddir/build/BUILD/bash-4.2/array.c:814: deref_ptr_in_call: Dereferencing pointer "t". (The dereference is assumed on the basis of the 'nonnull' parameter attribute.) /builddir/build/BUILD/bash-4.2/array.c:819: check_after_deref: Dereferencing "t" before a null check. Error: REVERSE_INULL (CWE-476): /builddir/build/BUILD/bash-4.2/general.c:175: deref_ptr_in_call: Dereferencing pointer "string". /builddir/build/BUILD/bash-4.2/general.c:185: check_after_deref: Dereferencing "string" before a null check. Error: REVERSE_INULL (CWE-476): /builddir/build/BUILD/bash-4.2/print_cmd.c:962: deref_ptr: Directly dereferencing pointer "cstring". /builddir/build/BUILD/bash-4.2/print_cmd.c:973: check_after_deref: Dereferencing "cstring" before a null check. Error: REVERSE_INULL (CWE-476): /builddir/build/BUILD/bash-4.2/execute_cmd.c:3834: deref_ptr: Directly dereferencing pointer "words->word". /builddir/build/BUILD/bash-4.2/execute_cmd.c:3880: deref_ptr: Directly dereferencing pointer "words->word". /builddir/build/BUILD/bash-4.2/execute_cmd.c:3962: check_after_deref: Dereferencing "words->word" before a null check. Error: REVERSE_INULL (CWE-476): /builddir/build/BUILD/bash-4.2/execute_cmd.c:1225: deref_ptr: Directly dereferencing pointer "command". /builddir/build/BUILD/bash-4.2/execute_cmd.c:1227: check_after_deref: Dereferencing "command" before a null check. Error: REVERSE_INULL (CWE-476): /builddir/build/BUILD/bash-4.2/lib/readline/complete.c:1323: deref_ptr: Directly dereferencing pointer "matches". /builddir/build/BUILD/bash-4.2/lib/readline/complete.c:1326: check_after_deref: Dereferencing "matches" before a null check. Error: SIZECHECK (CWE-131): /builddir/build/BUILD/bash-4.2/lib/readline/tilde.c:273: size_is_strlen: Calling allocating function "xmalloc" with function argument "strlen(fname)". Did you intend to add 1 to the byte count? /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: buffer_alloc: "malloc" allocates memory determined by parameter "bytes" of the current function. /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = storage allocated by "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_dbuffer: Returning allocated array "temp". Error: SIZECHECK (CWE-131): /builddir/build/BUILD/bash-4.2/lib/tilde/tilde.c:273: size_is_strlen: Calling allocating function "xmalloc" with function argument "strlen(fname)". Did you intend to add 1 to the byte count? /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: buffer_alloc: "malloc" allocates memory determined by parameter "bytes" of the current function. /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:61: var_assign: Assigning: "temp" = storage allocated by "malloc(bytes)". /builddir/build/BUILD/bash-4.2/lib/readline/xmalloc.c:64: return_dbuffer: Returning allocated array "temp". Error: SIZEOF_MISMATCH (CWE-569): /builddir/build/BUILD/bash-4.2/lib/glob/xmbsrtowcs.c:339: suspicious_sizeof: Passing argument "indices" of type "char **" and argument "wsbuf_size * sizeof (char **) /*8*/" to function "realloc" is suspicious. Did you intend to use "sizeof(char *)" instead of "sizeof (char **)" ? In this particular case sizeof(char **) happens to be equal to sizeof(char *), but this is not a portable assumption. Error: SIZEOF_MISMATCH (CWE-569): /builddir/build/BUILD/bash-4.2/variables.c:4062: suspicious_sizeof: Passing argument "dollar_arg_stack" of type "WORD_LIST **" and argument "(dollar_arg_stack_slots += 10) * sizeof (WORD_LIST **) /*8*/" to function "xrealloc" is suspicious. Did you intend to use "sizeof(WORD_LIST *)" instead of "sizeof (WORD_LIST **)" ? In this particular case sizeof(WORD_LIST **) happens to be equal to sizeof(WORD_LIST *), but this is not a portable assumption. Error: UNINIT (CWE-457): /builddir/build/BUILD/bash-4.2/sig.c:666: var_decl: Declaring variable "act" without initializer. /builddir/build/BUILD/bash-4.2/sig.c:679: uninit_use_in_call: Using uninitialized value "act": field "act".sa_restorer is uninitialized when calling "sigaction". Error: UNINIT (CWE-457): /builddir/build/BUILD/bash-4.2/arrayfunc.c:874: var_decl: Declaring variable "akey" without initializer. /builddir/build/BUILD/bash-4.2/arrayfunc.c:967: uninit_use_in_call: Using uninitialized value "akey" when calling "assoc_reference". /builddir/build/BUILD/bash-4.2/assoc.c:111: read_parm: Reading a parameter value. Error: UNINIT (CWE-457): /builddir/build/BUILD/bash-4.2/subst.c:6764: var_decl: Declaring variable "temp" without initializer. /builddir/build/BUILD/bash-4.2/subst.c:6851: uninit_use: Using uninitialized value "temp". Error: UNINIT (CWE-457): /builddir/build/BUILD/bash-4.2/subst.c:5891: var_decl: Declaring variable "t" without initializer. /builddir/build/BUILD/bash-4.2/subst.c:5926: uninit_use: Using uninitialized value "*t". /builddir/build/BUILD/bash-4.2/subst.c:5926: uninit_use: Using uninitialized value "t". Error: UNINIT (CWE-457): /builddir/build/BUILD/bash-4.2/subst.c:6574: var_decl: Declaring variable "temp" without initializer. /builddir/build/BUILD/bash-4.2/subst.c:6708: uninit_use: Using uninitialized value "temp". Error: UNINIT (CWE-457): /builddir/build/BUILD/bash-4.2/lib/readline/signals.c:296: var_decl: Declaring variable "act" without initializer. /builddir/build/BUILD/bash-4.2/lib/readline/signals.c:306: uninit_use_in_call: Using uninitialized value "act": field "act".sa_restorer is uninitialized when calling "sigaction". Error: UNINIT (CWE-457): /builddir/build/BUILD/bash-4.2/sig.c:231: var_decl: Declaring variable "act" without initializer. /builddir/build/BUILD/bash-4.2/sig.c:254: uninit_use_in_call: Using uninitialized value "act": field "act".sa_restorer is uninitialized when calling "sigaction". Error: UNINIT (CWE-457): /builddir/build/BUILD/bash-4.2/execute_cmd.c:3648: var_decl: Declaring variable "old_builtin" without initializer. /builddir/build/BUILD/bash-4.2/execute_cmd.c:3987: uninit_use: Using uninitialized value "old_builtin". Error: UNINIT (CWE-457): /builddir/build/BUILD/bash-4.2/execute_cmd.c:3648: var_decl: Declaring variable "old_command_builtin" without initializer. /builddir/build/BUILD/bash-4.2/execute_cmd.c:3988: uninit_use: Using uninitialized value "old_command_builtin". Error: UNINIT (CWE-457): /builddir/build/BUILD/bash-4.2/lib/readline/complete.c:1153: var_decl: Declaring variable "ps1" without initializer. /builddir/build/BUILD/bash-4.2/lib/readline/complete.c:1209: uninit_use: Using uninitialized value "ps1": field "ps1".__count is uninitialized. Error: UNINIT (CWE-457): /builddir/build/BUILD/bash-4.2/lib/readline/display.c:502: var_decl: Declaring variable "wc" without initializer. /builddir/build/BUILD/bash-4.2/lib/readline/display.c:764: uninit_use_in_call: Using uninitialized value "wc" when calling "wcwidth". Error: UNINIT (CWE-457): /builddir/build/BUILD/bash-4.2/lib/readline/display.c:504: var_decl: Declaring variable "wc_width" without initializer. /builddir/build/BUILD/bash-4.2/lib/readline/display.c:864: uninit_use: Using uninitialized value "wc_width". Error: UNINIT (CWE-457): /builddir/build/BUILD/bash-4.2/lib/readline/text.c:861: var_decl: Declaring variable "mbkey" without initializer. /builddir/build/BUILD/bash-4.2/lib/readline/text.c:875: uninit_use_in_call: Using uninitialized element of array "mbkey" when calling "rl_insert_text". /builddir/build/BUILD/bash-4.2/lib/readline/text.c:89: read_parm: Reading a parameter value. Error: UNINIT (CWE-457): /builddir/build/BUILD/bash-4.2/support/bashversion.c:68: var_decl: Declaring variable "rv" without initializer. /builddir/build/BUILD/bash-4.2/support/bashversion.c:135: uninit_use_in_call: Using uninitialized value "rv" when calling "printf". Error: UNREACHABLE (CWE-561): /builddir/build/BUILD/bash-4.2/lib/sh/input_avail.c:88: unreachable: This code cannot be reached: "result = -1;". Error: UNREACHABLE (CWE-561): /builddir/build/BUILD/bash-4.2/lib/sh/unicode.c:231: unreachable: This code cannot be reached: "n = u32tochar(wc, s);". Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/subst.c:1657: returned_pointer: Pointer "temp" returned by "extract_delimited_string(ss, &si, "$(", "(", ")", 9)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/subst.c:1659: returned_pointer: Pointer "temp" returned by "extract_dollar_brace_string(ss, &si, 0, 1)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/subst.c:1438: returned_pointer: Pointer "t" returned by "extract_command_subst(string, &si, flags | 1)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/subst.c:1428: returned_pointer: Pointer "t" returned by "string_extract(string, &si, "`", flags | 1)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/subst.c:963: returned_pointer: Pointer "ret" returned by "extract_command_subst(string, &si, 1)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/subst.c:965: returned_pointer: Pointer "ret" returned by "extract_dollar_brace_string(string, &si, 1, 1)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/subst.c:1274: returned_pointer: Pointer "t" returned by "extract_command_subst(string, &si, flags | 1)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/subst.c:1292: returned_pointer: Pointer "t" returned by "extract_delimited_string(string, &si, alt_opener, alt_opener, closer, flags | 1)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/subst.c:1283: returned_pointer: Pointer "t" returned by "extract_delimited_string(string, &si, opener, alt_opener, closer, flags | 1)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/subst.c:1311: returned_pointer: Pointer "t" returned by "string_extract(string, &si, "`", flags | 1)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/subst.c:2793: returned_pointer: Pointer "t" returned by "mbschr(name, 91)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/lib/readline/tilde.c:199: returned_pointer: Pointer "result" returned by "strchr(string, 126)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:2929: returned_pointer: Pointer "vlist" returned by "vlist_alloc(n)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/subst.c:1758: returned_pointer: Pointer "temp" returned by "extract_delimited_string(string, &si, "$(", "(", ")", 9)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/subst.c:1791: returned_pointer: Pointer "temp" returned by "extract_delimited_string(string, &si, open, "(", ")", 1)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/subst.c:1760: returned_pointer: Pointer "temp" returned by "extract_dollar_brace_string(string, &si, 0, 1)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/subst.c:1773: returned_pointer: Pointer "temp" returned by "extract_process_subst(string, ((c == 60) ? "<(" : ">("), &si)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/execute_cmd.c:1952: returned_pointer: Pointer "v" returned by "bind_array_variable(cp->c_name, ind, t, 0)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/execute_cmd.c:1948: returned_pointer: Pointer "v" returned by "convert_var_to_array(v)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/lib/sh/stringlist.c:71: returned_pointer: Pointer "sl" returned by "strlist_create(n)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/pcomplete.c:921: returned_pointer: Pointer "v" returned by "bind_comp_words(lwords)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/bashline.c:687: returned_pointer: Pointer "temp" returned by "fgets(buffer, 255, file)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/jobs.c:2243: returned_pointer: Pointer "sigint_handler" returned by "trap_to_sighandler(2)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/lib/readline/kill.c:568: returned_pointer: Pointer "entry" returned by "previous_history()" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/lib/tilde/tilde.c:199: returned_pointer: Pointer "result" returned by "strchr(string, 126)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/locale.c:326: returned_pointer: Pointer "t" returned by "setlocale(0, get_locale_var("LC_CTYPE"))" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/locale.c:335: returned_pointer: Pointer "t" returned by "setlocale(1, get_locale_var("LC_NUMERIC"))" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/locale.c:338: returned_pointer: Pointer "t" returned by "setlocale(2, get_locale_var("LC_TIME"))" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/locale.c:329: returned_pointer: Pointer "t" returned by "setlocale(3, get_locale_var("LC_COLLATE"))" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/locale.c:332: returned_pointer: Pointer "t" returned by "setlocale(5, get_locale_var("LC_MESSAGES"))" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:2470: returned_pointer: Pointer "entry" returned by "copy_function_def_contents(value, entry)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:1709: returned_pointer: Pointer "v" returned by "init_dynamic_array_var("BASH_ARGC", get_self, null_array_assign, 24576)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:1710: returned_pointer: Pointer "v" returned by "init_dynamic_array_var("BASH_ARGV", get_self, null_array_assign, 24576)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:1713: returned_pointer: Pointer "v" returned by "init_dynamic_array_var("BASH_LINENO", get_self, null_array_assign, 24576)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:1712: returned_pointer: Pointer "v" returned by "init_dynamic_array_var("BASH_SOURCE", get_self, null_array_assign, 24576)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:1702: returned_pointer: Pointer "v" returned by "init_dynamic_array_var("DIRSTACK", get_dirstack, assign_dirstack, 0)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:1706: returned_pointer: Pointer "v" returned by "init_dynamic_array_var("GROUPS", get_groupset, null_array_assign, 16384)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:1717: returned_pointer: Pointer "v" returned by "init_dynamic_assoc_var("BASH_ALIASES", get_aliasvar, assign_aliasvar, 131072)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:1715: returned_pointer: Pointer "v" returned by "init_dynamic_assoc_var("BASH_CMDS", get_hashcmd, assign_hashcmd, 131072)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:1721: returned_pointer: Pointer "v" returned by "init_funcname_var()" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:1679: returned_pointer: Pointer "v" returned by "init_seconds_var()" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:640: returned_pointer: Pointer "temp_var" returned by "bind_variable("HOME", sh_get_home_dir(), 0)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:617: returned_pointer: Pointer "temp_var" returned by "set_if_not("HOSTNAME", current_host_name)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:613: returned_pointer: Pointer "temp_var" returned by "set_if_not("HOSTTYPE", "x86_64")" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:615: returned_pointer: Pointer "temp_var" returned by "set_if_not("MACHTYPE", "x86_64-unknown-linux-gnu")" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:614: returned_pointer: Pointer "temp_var" returned by "set_if_not("OSTYPE", "linux-gnu")" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:658: returned_pointer: Pointer "temp_var" returned by "bind_variable("SHELL", current_user.shell, 0)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:492: returned_pointer: Pointer "temp_var" returned by "bind_variable("BASH", name, 0)" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:419: returned_pointer: Pointer "temp_var" returned by "set_if_not("PATH", "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:.")" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:424: returned_pointer: Pointer "temp_var" returned by "set_if_not("TERM", "dumb")" is never used. Error: UNUSED_VALUE (CWE-563): /builddir/build/BUILD/bash-4.2/variables.c:412: returned_pointer: Pointer "temp_var" returned by "set_if_not("_", dollar_vars[0])" is never used. Error: USE_AFTER_FREE (CWE-416): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:597: freed_arg: "free" frees "subdir". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:626: deref_arg: Calling "strlen" dereferences freed pointer "subdir". (The dereference is assumed on the basis of the 'nonnull' parameter attribute.) Error: USE_AFTER_FREE (CWE-416): /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:638: freed_arg: "free" frees "subdir". /builddir/build/BUILD/bash-4.2/lib/glob/glob.c:606: pass_freed_arg: Passing freed pointer "subdir" as an argument to function "finddirs". Error: USE_AFTER_FREE (CWE-416): /builddir/build/BUILD/bash-4.2/lib/sh/zmapfd.c:70: freed_arg: "free" frees "result". /builddir/build/BUILD/bash-4.2/lib/sh/zmapfd.c:81: pass_freed_arg: Passing freed pointer "result" as an argument to function "xrealloc". Error: USE_AFTER_FREE (CWE-416): /builddir/build/BUILD/bash-4.2/lib/sh/zmapfd.c:70: freed_arg: "free" frees "result". /builddir/build/BUILD/bash-4.2/lib/sh/zmapfd.c:82: use_after_free: Using freed pointer "result". Error: USE_AFTER_FREE (CWE-416): /builddir/build/BUILD/bash-4.2/execute_cmd.c:1665: freed_arg: "cpe_dispose" frees "p". /builddir/build/BUILD/bash-4.2/execute_cmd.c:1577: freed_arg: "free" frees parameter "cpe". /builddir/build/BUILD/bash-4.2/execute_cmd.c:1643: use_after_free: Using freed pointer "p". Error: VARARGS (CWE-234): /builddir/build/BUILD/bash-4.2/print_cmd.c:1425: va_init: Initializing va_list "args". /builddir/build/BUILD/bash-4.2/print_cmd.c:1495: missing_va_end: va_end was not called for "args".