LDRA Testbed Code Review Report

LDRA Testbed ® Code Review Report

# System : Dovecot-src-master

Overall Result: FAIL

Report Production | Report Configuration | Analysis phases
--- | --- | ---
C/C++ LDRA Testbed Version: 8.3.0 Config. File: C:\Testbed\CCPP_830_Release\C\sate_creport.dat Produced On: Mon Aug 09 2010 at 20:14:56 Penalty File: C:\Testbed\CCPP_830_Release\c\cpen.dat | Report Level: Summary Report Procedures Reported: Fails Only Programming Standards Model: SATE 2010 L1 Plus Line Numbers refer to: Original Source File Violation Details: Violations Only Reporting Scope: Full analysis scope | Static: Yes Complexity: Yes Static Data Flow: Yes Information Flow: Yes Cross Reference: Yes

#### Contents

Overall Quality Summary

- Totals of Violations for each Standard
- Table of Procedure Results
- Table of Source Files in System
- Table of Global Basic Information

Report on Program Components

- Quality Results Global Program and Selected Procedures

## Overall Quality Summary

#### Totals for Violated Quality Standards

Number of Violations | LDRA Code | (M) Mandatory Standards | CERT Code
--- | --- | --- | ---
1 | 47 S | Array Bound exceeded. | CERT ARR30-C
82 | 77 S | Macro replacement list needs parentheses. | CERT PRE02-C
55 | 78 S | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
1 | 483 S | free parameter is not heap item. | CERT MEM34-C
23 | 484 S | Attempt to use already freed object. | CERT MEM31-C
1 | 486 S | Insufficient formats in output function. | CERT FIO00-C
8 | 577 S | Sizeof argument is a pointer. | CERT EXP01-C
31 | 5 D | Procedure contains UR data flow anomalies. | CERT EXP33-C
222 | 45 D | Pointer not checked for null before use | CERT EXP08-C,EXP34-C
8 | 50 D | Memory not freed after last reference. | CERT MEM00-C
11 | 51 D | Attempt to read from freed memory. | CERT MEM30-C
11 | 57 D | Global not initialised at declaration. | CERT EXP33-C
86 | 69 D | Procedure contains UR data flow anomalies. | CERT EXP33-C
14 | 77 D | Local structure returned in function result |
5 | 86 D | User input not checked before use. | CERT FIO30-C
20 | 1 X | Declaration types do not match across a system. | CERT ARR31-C

Number of Violations | LDRA Code | (C) Checking (Mandatory) Standards | CERT Code
--- | --- | --- | ---
8 | 76 D | Procedure not called in code analysed |

Number of Violations | LDRA Code | (O) Optional Standards | CERT Code
--- | --- | --- | ---
1 | 80 D | Potentially unused function return value. | CERT FIO04-C

Number of Mandatory Standards checked | 27
Number of Checking Standards checked | 1
Number of Optional Standards checked | 3
Total Standards checked | 31

### OVERALL RESULT: FAIL

Out of 258 program components, 129 (50.00 %) pass ( of which 0 conditionally pass ) and 129 fail ( of which 0 fail only because of insufficient comments )

#### Procedure Results

`Quality Result` |  | `Procedure` |  | `Source File` |  | `Unique Violations` |  | `Failure Density` |
`` |  |  |  |  | `(Viols/R.Line %)` |
FAIL |  | Global Program |
Pass |  | buffer_get_data |  | buffer.h analysed in anvil-client.c |  | 0 |  | 0 |
Pass |  | buffer_get_used_size |  | buffer.h analysed in anvil-client.c |  | 0 |  | 0 |
Pass |  | array_create_from_buffer_i |  | array.h analysed in anvil-client.c |  | 0 |  | 0 |
FAIL |  | array_create_i |  | array.h analysed in anvil-client.c |  | 1 | - |  | 17 | - |
Pass |  | array_free_i |  | array.h analysed in anvil-client.c |  | 0 |  | 0 |
Pass |  | array_is_created_i |  | array.h analysed in anvil-client.c |  | 0 |  | 0 |
Pass |  | array_get_pool_i |  | array.h analysed in anvil-client.c |  | 0 |  | 0 |
Pass |  | array_clear_i |  | array.h analysed in anvil-client.c |  | 0 |  | 0 |
Pass |  | array_append_i |  | array.h analysed in anvil-client.c |  | 0 |  | 0 |
Pass |  | array_append_array_i |  | array.h analysed in anvil-client.c |  | 0 |  | 0 |
Pass |  | array_insert_i |  | array.h analysed in anvil-client.c |  | 0 |  | 0 |
Pass |  | array_delete_i |  | array.h analysed in anvil-client.c |  | 0 |  | 0 |
Pass |  | array_get_i |  | array.h analysed in anvil-client.c |  | 0 |  | 0 |
Pass |  | array_idx_i |  | array.h analysed in anvil-client.c |  | 0 |  | 0 |
Pass |  | array_get_modifiable_i |  | array.h analysed in anvil-client.c |  | 0 |  | 0 |
Pass |  | array_append_space_i |  | array.h analysed in anvil-client.c |  | 0 |  | 0 |
Pass |  | array_copy |  | array.h analysed in anvil-client.c |  | 0 |  | 0 |
Pass |  | array_count_i |  | array.h analysed in anvil-client.c |  | 0 |  | 0 |
Pass |  | aqueue_idx |  | aqueue.h analysed in anvil-client.c |  | 0 |  | 0 |
FAIL |  | anvil_client_init |  | anvil-client.c |  | 1 | - |  | 23 | - |
FAIL |  | anvil_client_deinit |  | anvil-client.c |  | 1 | - |  | 11 | - |
Pass |  | anvil_reconnect |  | anvil-client.c |  | 0 |  | 0 |
FAIL |  | anvil_input |  | anvil-client.c |  | 1 | - |  | 2 | - |
Pass |  | anvil_client_connect |  | anvil-client.c |  | 0 |  | 0 |
FAIL |  | anvil_client_cancel_queries |  | anvil-client.c |  | 1 | - |  | 7 | - |
Pass |  | anvil_client_disconnect |  | anvil-client.c |  | 0 |  | 0 |
Pass |  | anvil_client_send |  | anvil-client.c |  | 0 |  | 0 |
Pass |  | anvil_client_query |  | anvil-client.c |  | 0 |  | 0 |
Pass |  | anvil_client_cmd |  | anvil-client.c |  | 0 |  | 0 |
Pass |  | drop_capabilities |  | capabilities.h analysed in capabilities-posix.c |  | 0 |  | 0 |
Pass |  | dup2_append |  | dup2-array.c |  | 0 |  | 0 |
FAIL |  | dup2_array |  | dup2-array.c |  | 1 | - |  | 1 | - |
FAIL |  | process_exec |  | main.c |  | 1 | - |  | 17 | - |
Pass |  | get_uidgid |  | main.c |  | 0 |  | 0 |
Pass |  | get_gid |  | main.c |  | 0 |  | 0 |
FAIL |  | master_fatal_callback |  | main.c |  | 2 | - |  | 23 | - |
FAIL |  | startup_fatal_handler |  | main.c |  | 1 | - |  | 50 | - |
FAIL |  | startup_error_handler |  | main.c |  | 1 | - |  | 50 | - |
FAIL |  | fatal_log_check |  | main.c |  | 1 | - |  | 6 | - |
FAIL |  | pid_file_read |  | main.c |  | 1 | - |  | 3 | - |
FAIL |  | pid_file_check_running |  | main.c |  | 1 | - |  | 13 | - |
FAIL |  | create_pid_file |  | main.c |  | 1 | - |  | 5 | - |
FAIL |  | create_config_symlink |  | main.c |  | 1 | - |  | 5 | - |
FAIL |  | sig_settings_reload |  | main.c |  | 2 | - |  | 22 | - |
FAIL |  | sig_log_reopen |  | main.c |  | 1 | - |  | 17 | - |
FAIL |  | sig_reap_children |  | main.c |  | 1 | - |  | 33 | - |
FAIL |  | sig_die |  | main.c |  | 1 | - |  | 14 | - |
FAIL |  | master_settings_read |  | main.c |  | 1 | - |  | 58 | - |

`Quality Result` |  | `Procedure` |  | `Source File` |  | `Unique Violations` |  | `Failure Density` |
`` |  |  |  |  | `(Viols/R.Line %)` |
FAIL |  | main_log_startup |  | main.c |  | 1 | - |  | 8 | - |
Pass |  | main_init |  | main.c |  | 0 |  | 0 |
FAIL |  | main_deinit |  | main.c |  | 1 | - |  | 44 | - |
FAIL |  | get_full_config_path |  | main.c |  | 1 | - |  | 7 | - |
FAIL |  | master_time_moved |  | main.c |  | 1 | - |  | 5 | - |
Pass |  | daemonize |  | main.c |  | 0 |  | 0 |
Pass |  | print_help |  | main.c |  | 0 |  | 0 |
FAIL |  | print_build_options |  | main.c |  | 1 | - |  | 4 | - |
FAIL |  | main |  | main.c |  | 2 | - |  | 8 | - |
FAIL |  | master_auth_init |  | master-auth.c |  | 1 | - |  | 40 | - |
Pass |  | master_auth_connection_deinit |  | master-auth.c |  | 0 |  | 0 |
FAIL |  | master_auth_deinit |  | master-auth.c |  | 1 | - |  | 17 | - |
FAIL |  | master_auth_connection_input |  | master-auth.c |  | 1 | - |  | 6 | - |
FAIL |  | master_auth_connection_timeout |  | master-auth.c |  | 1 | - |  | 17 | - |
FAIL |  | master_auth_request |  | master-auth.c |  | 1 | - |  | 5 | - |
Pass |  | master_auth_request_abort |  | master-auth.c |  | 0 |  | 0 |
FAIL |  | master_login_auth_init |  | master-login-auth.c |  | 1 | - |  | 36 | - |
FAIL |  | master_login_auth_disconnect |  | master-login-auth.c |  | 1 | - |  | 3 | - |
Pass |  | master_login_auth_unref |  | master-login-auth.c |  | 0 |  | 0 |
Pass |  | master_login_auth_deinit |  | master-login-auth.c |  | 0 |  | 0 |
Pass |  | auth_get_next_timeout_secs |  | master-login-auth.c |  | 0 |  | 0 |
FAIL |  | master_login_auth_timeout |  | master-login-auth.c |  | 1 | - |  | 4 | - |
Pass |  | master_login_auth_set_timeout |  | master-login-auth.c |  | 0 |  | 0 |
FAIL |  | master_login_auth_lookup_request |  | master-login-auth.c |  | 1 | - |  | 2 | - |
FAIL |  | master_login_auth_input_user |  | master-login-auth.c |  | 1 | - |  | 9 | - |
FAIL |  | master_login_auth_input_notfound |  | master-login-auth.c |  | 1 | - |  | 11 | - |
FAIL |  | master_login_auth_input_fail |  | master-login-auth.c |  | 1 | - |  | 5 | - |
FAIL |  | master_login_auth_input |  | master-login-auth.c |  | 1 | - |  | 2 | - |
Pass |  | master_login_auth_connect |  | master-login-auth.c |  | 0 |  | 0 |
FAIL |  | master_login_auth_request |  | master-login-auth.c |  | 1 | - |  | 6 | - |
Pass |  | master_login_au h_request_count |  | master-login-auth.c |  | 0 |  | 0 |
FAIL |  | master_login_init |  | master-login.c |  | 1 | - |  | 15 | - |
FAIL |  | master_login_deinit |  | master-login.c |  | 1 | - |  | 12 | - |
FAIL |  | master_login_conn_read_request |  | master-login.c |  | 1 | - |  | 1 | - |
FAIL |  | master_login_client_free |  | master-login.c |  | 1 | - |  | 6 | - |
FAIL |  | master_login_auth_finish |  | master-login.c |  | 1 | - |  | 7 | - |
FAIL |  | master_login_postlogin_free |  | master-login.c |  | 1 | - |  | 15 | - |
FAIL |  | master_login_postlogin_input |  | master-login.c |  | 2 | - |  | 13 | - |
FAIL |  | master_login_postlogin_timeout |  | master-login.c |  | 1 | - |  | 33 | - |
FAIL |  | master_login_postlogin |  | master-login.c |  | 1 | - |  | 9 | - |
FAIL |  | master_login_auth_callback |  | master-login.c |  | 1 | - |  | 10 | - |
FAIL |  | master_login_conn_input |  | master-login.c |  | 2 | - |  | 42 | - |
FAIL |  | master_login_add |  | master-login.c |  | 1 | - |  | 9 | - |
FAIL |  | master_login_conn_close |  | master-login.c |  | 1 | - |  | 2 | - |
FAIL |  | master_login_conn_unref |  | master-login.c |  | 1 | - |  | 3 | - |
Pass |  | master_login_stop |  | master-login.c |  | 0 |  | 0 |
FAIL |  | master_service_settings_cache_init |  | master-service- ettings-cache.c |  | 1 | - |  | 27 | - |
FAIL |  | master_service_settings_cache_deinit |  | master-service- ettings-cache.c |  | 1 | - |  | 3 | - |
Pass |  | cache_can_return_global |  | master-service- ettings-cache.c |  | 0 |  | 0 |

`Quality Result` |  | `Procedure` |  | `Source File` |  | `Unique Violations` |  | `Failure Density` |
`` |  |  |  |  | `(Viols/R.Line %)` |
Pass |  | cache_find |  | master-service- ettings-cache.c |  | 0 |  | 0 |
Pass |  | setting_entry_detach |  | master-service- ettings-cache.c |  | 0 |  | 0 |
FAIL |  | cache_add |  | master-service- ettings-cache.c |  | 1 | - |  | 4 | - |
FAIL |  | master_service_settings_cache_read |  | master-service- ettings-cache.c |  | 1 | - |  | 14 | - |
Pass |  | master_service_settings_check |  | master-service-settings.c |  | 0 |  | 0 |
FAIL |  | master_service_exec_config |  | master-service-settings.c |  | 1 | - |  | 7 | - |
FAIL |  | config_exec_fallback |  | master-service-settings.c |  | 1 | - |  | 3 | - |
FAIL |  | master_service_open_config |  | master-service-settings.c |  | 1 | - |  | 1 | - |
Pass |  | config_build_request |  | master-service-settings.c |  | 0 |  | 0 |
FAIL |  | config_send_request |  | master-service-settings.c |  | 1 | - |  | 4 | - |
FAIL |  | master_service_apply_config_overrides |  | master-service-settings.c |  | 1 | - |  | 4 | - |
FAIL |  | config_read_reply_header |  | master-service-settings.c |  | 2 | - |  | 6 | - |
FAIL |  | master_service_settings_read |  | master-service-settings.c |  | 1 | - |  | 4 | - |
FAIL |  | master_service_settings_read_simple |  | master-service-settings.c |  | 1 | - |  | 56 | - |
Pass |  | master_service_settings_detach |  | master-service-settings.c |  | 0 |  | 0 |
Pass |  | master_service_settings_get |  | master-service-settings.c |  | 0 |  | 0 |
Pass |  | master_service_ ettings_get_others |  | master-service-settings.c |  | 0 |  | 0 |
Pass |  | master_service_set |  | master-service-settings.c |  | 0 |  | 0 |
FAIL |  | master_service_set_has_config_override |  | master-service-settings.c |  | 1 | - |  | 5 | - |
Pass |  | master_service_getopt_string |  | master-service.c |  | 0 |  | 0 |
Pass |  | sig_die |  | master-service.c |  | 0 |  | 0 |
Pass |  | sig_state_changed |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_ erify_version_string |  | master-service.c |  | 0 |  | 0 |
FAIL |  | master_service_init |  | master-service.c |  | 1 | - |  | 2 | - |
Pass |  | master_getopt |  | master-service.c |  | 0 |  | 0 |
FAIL |  | master_service_init_log |  | master-service.c |  | 1 | - |  | 5 | - |
Pass |  | master_service_ et_die_with_master |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_ et_die_callback |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_parse_option |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_error |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_status_error |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_init_finish |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_env_clean |  | master-service.c |  | 0 |  | 0 |
FAIL |  | master_service_set_client_limit |  | master-service.c |  | 1 | - |  | 4 | - |
Pass |  | master_service_ et_client_limit |  | master-service.c |  | 0 |  | 0 |
FAIL |  | master_service_set_service_count |  | master-service.c |  | 1 | - |  | 5 | - |
Pass |  | master_service_ et_service_count |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_ et_socket_count |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_ et_avail_overflow_callback |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_get_config_path |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_ et_version_string |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_get_name |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_run |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_stop |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_ top_new_connections |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_anvil_send |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_ lient_connection_accept |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_ lient_connection_destroyed |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_set_login_state |  | master-service.c |  | 0 |  | 0 |

`Quality Result` |  | `Procedure` |  | `Source File` |  | `Unique Violations` |  | `Failure Density` |
`` |  |  |  |  | `(Viols/R.Line %)` |
Pass |  | master_service_ efresh_login_state |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_close_config_fd |  | master-service.c |  | 0 |  | 0 |
FAIL |  | master_service_deinit |  | master-service.c |  | 2 | - |  | 12 | - |
FAIL |  | master_service_listen |  | master-service.c |  | 1 | - |  | 1 | - |
FAIL |  | io_listeners_init |  | master-service.c |  | 1 | - |  | 3 | - |
Pass |  | master_service_ o_listeners_add |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_ o_listeners_remove |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_service_ o_listeners_close |  | master-service.c |  | 0 |  | 0 |
Pass |  | master_status_u date_is_important |  | master-service.c |  | 0 |  | 0 |
FAIL |  | master_status_update |  | master-service.c |  | 1 | - |  | 2 | - |
FAIL |  | version_string_verify |  | master-service.c |  | 1 | - |  | 7 | - |
Pass |  | expand_user |  | master-settings.c |  | 0 |  | 0 |
Pass |  | fix_file_listener_paths |  | master-settings.c |  | 0 |  | 0 |
FAIL |  | add_inet_listeners |  | master-settings.c |  | 1 | - |  | 3 | - |
Pass |  | master_settings_parse_type |  | master-settings.c |  | 0 |  | 0 |
Pass |  | service_set_login_dump_core |  | master-settings.c |  | 0 |  | 0 |
FAIL |  | services_have_protocol |  | master-settings.c |  | 1 | - |  | 5 | - |
FAIL |  | master_settings_verify |  | master-settings.c |  | 2 | - |  | 2 | - |
FAIL |  | login_want_core_dumps |  | master-settings.c |  | 1 | - |  | 3 | - |
FAIL |  | settings_have_auth_unix_listeners_in |  | master-settings.c |  | 1 | - |  | 3 | - |
FAIL |  | unlink_sockets |  | master-settings.c |  | 1 | - |  | 1 | - |
FAIL |  | master_settings_do_fixes |  | master-settings.c |  | 1 | - |  | 4 | - |
Pass |  | service_list_an il_discard_input_stop |  | service-anvil.c |  | 0 |  | 0 |
Pass |  | anvil_input_fd_discard |  | service-anvil.c |  | 0 |  | 0 |
Pass |  | anvil_input_blocking_discard |  | service-anvil.c |  | 0 |  | 0 |
Pass |  | anvil_input_non locking_discard |  | service-anvil.c |  | 0 |  | 0 |
Pass |  | service_list_an il_discard_input |  | service-anvil.c |  | 0 |  | 0 |
Pass |  | anvil_send_handshake |  | service-anvil.c |  | 0 |  | 0 |
FAIL |  | service_process_write_anvil_kill |  | service-anvil.c |  | 1 | - |  | 5 | - |
FAIL |  | service_anvil_monitor_start |  | service-anvil.c |  | 1 | - |  | 6 | - |
FAIL |  | service_anvil_process_created |  | service-anvil.c |  | 1 | - |  | 5 | - |
Pass |  | service_anvil_p ocess_destroyed |  | service-anvil.c |  | 0 |  | 0 |
FAIL |  | service_anvil_send_log_fd |  | service-anvil.c |  | 1 | - |  | 7 | - |
FAIL |  | service_anvil_global_init |  | service-anvil.c |  | 1 | - |  | 5 | - |
FAIL |  | service_anvil_global_deinit |  | service-anvil.c |  | 1 | - |  | 4 | - |
Pass |  | service_get_backlog |  | service-listen.c |  | 0 |  | 0 |
Pass |  | service_unix_listener_listen |  | service-listen.c |  | 0 |  | 0 |
Pass |  | service_fifo_listener_listen |  | service-listen.c |  | 0 |  | 0 |
Pass |  | service_inet_listener_listen |  | service-listen.c |  | 0 |  | 0 |
Pass |  | service_listen |  | service-listen.c |  | 0 |  | 0 |
FAIL |  | services_listen |  | service-listen.c |  | 1 | - |  | 4 | - |
FAIL |  | listener_equals |  | service-listen.c |  | 1 | - |  | 3 | - |
FAIL |  | services_listen_using |  | service-listen.c |  | 2 | - |  | 9 | - |
Pass |  | service_log_fds_init |  | service-log.c |  | 0 |  | 0 |
FAIL |  | service_process_write_log_bye |  | service-log.c |  | 1 | - |  | 5 | - |
FAIL |  | services_log_init |  | service-log.c |  | 1 | - |  | 4 | - |
FAIL |  | services_log_deinit |  | service-log.c |  | 1 | - |  | 3 | - |
FAIL |  | services_log_dup2 |  | service-log.c |  | 1 | - |  | 6 | - |
Pass |  | service_process_kill_idle |  | service-monitor.c |  | 0 |  | 0 |

`Quality Result` |  | `Procedure` |  | `Source File` |  | `Unique Violations` |  | `Failure Density` |
`` |  |  |  |  | `(Viols/R.Line %)` |
Pass |  | service_status_more |  | service-monitor.c |  | 0 |  | 0 |
Pass |  | service_status_less |  | service-monitor.c |  | 0 |  | 0 |
FAIL |  | service_status_input_one |  | service-monitor.c |  | 1 | - |  | 2 | - |
FAIL |  | service_status_input |  | service-monitor.c |  | 1 | - |  | 2 | - |
Pass |  | service_monitor_throttle |  | service-monitor.c |  | 0 |  | 0 |
Pass |  | service_drop_connections |  | service-monitor.c |  | 0 |  | 0 |
Pass |  | service_accept |  | service-monitor.c |  | 0 |  | 0 |
Pass |  | service_monitor start_extra_avail |  | service-monitor.c |  | 0 |  | 0 |
Pass |  | service_monitor_listen_start |  | service-monitor.c |  | 0 |  | 0 |
Pass |  | service_monitor_listen_stop |  | service-monitor.c |  | 0 |  | 0 |
FAIL |  | service_login_create_notify_fd |  | service-monitor.c |  | 1 | - |  | 4 | - |
FAIL |  | services_monitor_start |  | service-monitor.c |  | 1 | - |  | 4 | - |
Pass |  | service_monitor_stop |  | service-monitor.c |  | 0 |  | 0 |
FAIL |  | services_monitor_stop |  | service-monitor.c |  | 1 | - |  | 6 | - |
FAIL |  | service_process_failure |  | service-monitor.c |  | 1 | - |  | 17 | - |
FAIL |  | services_monitor_reap_children |  | service-monitor.c |  | 2 | - |  | 8 | - |
FAIL |  | service_process_notify_init |  | service-process-notify.c |  | 1 | - |  | 27 | - |
FAIL |  | service_process_notify_reset |  | service-process-notify.c |  | 1 | - |  | 9 | - |
FAIL |  | notify_flush |  | service-process-notify.c |  | 1 | - |  | 6 | - |
FAIL |  | service_process_notify_deinit |  | service-process-notify.c |  | 1 | - |  | 10 | - |
Pass |  | service_process_notify_add |  | service-process-notify.c |  | 0 |  | 0 |
FAIL |  | service_dup_fds |  | service-process.c |  | 1 | - |  | 4 | - |
FAIL |  | drop_privileges |  | service-process.c |  | 1 | - |  | 26 | - |
FAIL |  | service_process_setup_environment |  | service-process.c |  | 1 | - |  | 1 | - |
Pass |  | service_process_status_timeout |  | service-process.c |  | 0 |  | 0 |
FAIL |  | service_process_create |  | service-process.c |  | 1 | - |  | 3 | - |
Pass |  | service_process_destroy |  | service-process.c |  | 0 |  | 0 |
Pass |  | service_process_ref |  | service-process.c |  | 0 |  | 0 |
Pass |  | service_process_unref |  | service-process.c |  | 0 |  | 0 |
Pass |  | get_exit_status_message |  | service-process.c |  | 0 |  | 0 |
Pass |  | log_coredump |  | service-process.c |  | 0 |  | 0 |
Pass |  | service_process get_status_error |  | service-process.c |  | 0 |  | 0 |
FAIL |  | service_process_log |  | service-process.c |  | 1 | - |  | 4 | - |
FAIL |  | service_process_log_status_error |  | service-process.c |  | 1 | - |  | 3 | - |
Pass |  | service_error |  | service.c |  | 0 |  | 0 |
FAIL |  | service_create_file_listener |  | service.c |  | 1 | - |  | 8 | - |
FAIL |  | resolve_ip |  | service.c |  | 1 | - |  | 9 | - |
FAIL |  | service_create_one_inet_listener |  | service.c |  | 1 | - |  | 7 | - |
FAIL |  | service_create_inet_listeners |  | service.c |  | 1 | - |  | 7 | - |
FAIL |  | service_create |  | service.c |  | 2 | - |  | 3 | - |
Pass |  | pid_hash |  | service.c |  | 0 |  | 0 |
Pass |  | pid_hash_cmp |  | service.c |  | 0 |  | 0 |
FAIL |  | service_lookup |  | service.c |  | 1 | - |  | 10 | - |
FAIL |  | service_lookup_type |  | service.c |  | 1 | - |  | 10 | - |
FAIL |  | service_want |  | service.c |  | 1 | - |  | 3 | - |
FAIL |  | services_create |  | service.c |  | 1 | - |  | 7 | - |
Pass |  | service_signal |  | service.c |  | 0 |  | 0 |
Pass |  | service_login_notify_send |  | service.c |  | 0 |  | 0 |
Pass |  | service_login_notify_timeout |  | service.c |  | 0 |  | 0 |

`Quality Result` |  | `Procedure` |  | `Source File` |  | `Unique Violations` |  | `Failure Density` |
`` |  |  |  |  | `(Viols/R.Line %)` |
Pass |  | service_login_notify |  | service.c |  | 0 |  | 0 |
FAIL |  | services_kill_timeout |  | service.c |  | 1 | - |  | 2 | - |
FAIL |  | services_destroy |  | service.c |  | 1 | - |  | 5 | - |
Pass |  | service_list_ref |  | service.c |  | 0 |  | 0 |
Pass |  | service_list_unref |  | service.c |  | 0 |  | 0 |
Pass |  | services_get_co fig_socket_path |  | service.c |  | 0 |  | 0 |
Pass |  | service_throttle_timeout |  | service.c |  | 0 |  | 0 |
FAIL |  | service_drop_listener_connections |  | service.c |  | 1 | - |  | 5 | - |
Pass |  | service_throttle |  | service.c |  | 0 |  | 0 |
FAIL |  | services_throttle_time_sensitives |  | service.c |  | 1 | - |  | 5 | - |
FAIL |  | service_pids_init |  | service.c |  | 1 | - |  | 20 | - |
FAIL |  | service_pids_deinit |  | service.c |  | 2 | - |  | 42 | - |
Pass |  | syslog_facility_find |  | syslog-util.c |  | 0 |  | 0 |

#### Global Information

#### Source Files in System

Name | Last Modification Date
--- | ---
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lib-master\syslog-util.c | Fri Mar 26 07:16:36 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lib-master\master-service.c | Thu Jun 24 19:00:04 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lib-master\master-service-settings.c | Wed Jun 16 19:00:04 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lib-master\master-service-settings-cache.c | Wed Jun 09 19:00:04 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lib-master\master-login.c | Mon Jun 14 19:00:04 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lib-master\master-login-auth.c | Mon May 03 19:00:04 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lib-master\master-auth.c | Wed Jun 09 19:00:04 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lib-master\anvil-client.c | Fri Mar 26 07:16:36 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\master\service.c | Fri Jun 25 08:22:16 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\master\service-process.c | Thu May 20 19:00:04 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\master\service-process-notify.c | Fri Mar 26 07:16:36 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\master\service-monitor.c | Fri Jun 25 08:22:16 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\master\service-log.c | Fri Mar 26 07:16:36 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\master\service-listen.c | Wed May 19 19:00:04 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\master\service-anvil.c | Fri Mar 26 07:16:36 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\master\master-settings.c | Fri Jun 25 08:22:16 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\master\main.c | Mon Jun 21 19:00:04 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\master\dup2-array.c | Fri Mar 26 07:16:36 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\master\capabilities-posix.c | Fri Mar 26 07:16:36 2010

#### Global Basic Information

Number of procedures: | 257
Number of locally uncalled procedures: | 3
Maximum loop depth: | 3
Total Cyclomatic Complexity: | 1050
Number of reformatted executable lines: | 10941
Number of lines of comments: | 14716

## Summary Report on all Program Components which FAIL

Globals / code outside procedures - FAIL

#### Standards Violation Summary - All files

Code | File: Src Line | Violation | Standard
--- | --- | --- | ---
M | compat.h: 214 | Macro replacement list needs parentheses. | CERT PRE02-C
M | compat.h: 215 | Macro replacement list needs parentheses. | CERT PRE02-C
M | compat.h: 216 | Macro replacement list needs parentheses. | CERT PRE02-C
M | compat.h: 217 | Macro replacement list needs parentheses. | CERT PRE02-C
M | compat.h: 218 | Macro replacement list needs parentheses. | CERT PRE02-C
M | compat.h: 219 | Macro replacement list needs parentheses. | CERT PRE02-C
M | compat.h: 220 | Macro replacement list needs parentheses. | CERT PRE02-C
M | compat.h: 221 | Macro replacement list needs parentheses. | CERT PRE02-C
M | compat.h: 222 | Macro replacement list needs parentheses. | CERT PRE02-C
M | compat.h: 223 | Macro replacement list needs parentheses. | CERT PRE02-C
M | compat.h: 224 | Macro replacement list needs parentheses. | CERT PRE02-C
M | compat.h: 225 | Macro replacement list needs parentheses. | CERT PRE02-C
M | compat.h: 226 | Macro replacement list needs parentheses. | CERT PRE02-C
M | macros.h: 196 | Macro replacement list needs parentheses. | CERT PRE02-C
M | macros.h: 197 | Macro replacement list needs parentheses. | CERT PRE02-C
M | macros.h: 204 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | macros.h: 204 | Macro replacement list needs parentheses. | CERT PRE02-C
M | macros.h: 205 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | macros.h: 205 | Macro replacement list needs parentheses. | CERT PRE02-C
M | macros.h: 223 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | macros.h: 223 | Macro replacement list needs parentheses. | CERT PRE02-C
M | macros.h: 232 | Macro replacement list needs parentheses. | CERT PRE02-C
M | data-stack.h: 49 | Macro replacement list needs parentheses. | CERT PRE02-C
M | data-stack.h: 51 | Macro replacement list needs parentheses. | CERT PRE02-C
M | data-stack.h: 75 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | data-stack.h: 85 | Macro replacement list needs parentheses. | CERT PRE02-C
M | data-stack.h: 90 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | data-stack.h: 90 | Macro replacement list needs parentheses. | CERT PRE02-C
M | data-stack.h: 97 | Macro replacement list needs parentheses. | CERT PRE02-C
M | mempool.h: 84 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | mempool.h: 87 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | mempool.h: 88 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | mempool.h: 99 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | mempool.h: 99 | Macro replacement list needs parentheses. | CERT PRE02-C
M | mempool.h: 102 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | mempool.h: 102 | Macro replacement list needs parentheses. | CERT PRE02-C
M | imem.h: 8 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | imem.h: 8 | Macro replacement list needs parentheses. | CERT PRE02-C
M | imem.h: 14 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | imem.h: 14 | Macro replacement list needs parentheses. | CERT PRE02-C
M | imem.h: 15 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | imem.h: 15 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array-decl.h: 4 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array-decl.h: 4 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array-decl.h: 7 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array-decl.h: 7 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array-decl.h: 9 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array-decl.h: 9 | Macro replacement list needs parentheses. | CERT PRE02-C
M | ioloop.h: 50 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | ioloop.h: 50 | Macro replacement list needs parentheses. | CERT PRE02-C

Code | File: Src Line | Violation | Standard
--- | --- | --- | ---
M | ioloop.h: 56 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | ioloop.h: 75 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | ioloop.h: 75 | Macro replacement list needs parentheses. | CERT PRE02-C
M | istream.h: 53 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | istream.h: 53 | Macro replacement list needs parentheses. | CERT PRE02-C
M | ostream.h: 61 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | ostream.h: 61 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 35 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 35 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 37 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 37 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 39 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 39 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 53 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 58 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 58 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 62 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 62 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 90 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 90 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 102 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 102 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 110 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 118 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 126 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 134 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 143 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 143 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 153 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 164 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 164 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 174 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 174 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 183 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 183 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 192 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 192 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 201 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 201 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 206 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 206 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 211 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 211 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 216 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 216 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 228 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 232 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 232 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 252 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 257 | Macro replacement list needs parentheses. | CERT PRE02-C

Code | File: Src Line | Violation | Standard
--- | --- | --- | ---
M | array.h: 261 | Macro replacement list needs parentheses. | CERT PRE02-C
M | array.h: 266 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 279 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | array.h: 279 | Macro replacement list needs parentheses. | CERT PRE02-C
M | main.c: 41 | Global not initialised at declaration. : master_uid | CERT EXP33-C
M | main.c: 42 | Global not initialised at declaration. : master_gid | CERT EXP33-C
M | main.c: 43 | Global not initialised at declaration. : core_dumps_disabled | CERT EXP33-C
M | main.c: 44 | Global not initialised at declaration. : ssl_manual_key_password | CERT EXP33-C
M | main.c: 45 | Global not initialised at declaration. : null_fd | CERT EXP33-C
M | main.c: 46 | Global not initialised at declaration. : services | CERT EXP33-C
M | main.c: 48 | Global not initialised at declaration. : pidfile_path | CERT EXP33-C
M | main.c: 51 | Global not initialised at declaration. : child_process_env | CERT EXP33-C
M | main.c: 0 | Procedure contains UR data flow anomalies. : (service_anvil_global)->blocking_fd | CERT EXP33-C
M | main.c: 0 | Procedure contains UR data flow anomalies. : (service_anvil_global)->log_fdpass_fd | CERT EXP33-C
M | main.c: 0 | Procedure contains UR data flow anomalies. : (service_anvil_global)->nonblocking_fd | CERT EXP33-C
M | main.c: 0 | Procedure contains UR data flow anomalies. : (service_anvil_global)->pid | CERT EXP33-C
M | main.c: 0 | Procedure contains UR data flow anomalies. : (service_anvil_global)->process_count | CERT EXP33-C
M | main.c: 0 | Procedure contains UR data flow anomalies. : (service_anvil_global)->uid | CERT EXP33-C
M | ioloop.h: 41 | Procedure contains UR data flow anomalies. : current_ioloop | CERT EXP33-C
| 66 (master-interface.h) |  |
M | ioloop.h: 38 | Procedure contains UR data flow anomalies. : ioloop_time | CERT EXP33-C
| 59 (master-interface.h) |  |
M | main.c: 0 | Procedure contains UR data flow anomalies. : service_anvil_global.blocking_fd | CERT EXP33-C
M | main.c: 0 | Procedure contains UR data flow anomalies. : service_anvil_global.io_blocking | CERT EXP33-C
M | main.c: 0 | Procedure contains UR data flow anomalies. : service_anvil_global.nonblocking_fd | CERT EXP33-C
M | common.h: 11 | Procedure contains UR data flow anomalies. : ssl_manual_key_password | CERT EXP33-C
| 11 |  |
M | main.c: 44 | Declaration types do not match across a system. : ssl_manual_key_password | CERT ARR31-C
| 11 (common.h) |  |
M | syslog-util.c: 7 | Declaration types do not match across a system. : syslog_facilities | CERT ARR31-C
| 9 (syslog-util.h) |  |
M | settings-parser.h: 46 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | settings-parser.h: 46 | Macro replacement list needs parentheses. | CERT PRE02-C
M | settings-parser.h: 50 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | settings-parser.h: 50 | Macro replacement list needs parentheses. | CERT PRE02-C
M | settings-parser.h: 54 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | settings-parser.h: 54 | Macro replacement list needs parentheses. | CERT PRE02-C
M | settings-parser.h: 58 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | settings-parser.h: 58 | Macro replacement list needs parentheses. | CERT PRE02-C
M | settings-parser.h: 62 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | settings-parser.h: 62 | Macro replacement list needs parentheses. | CERT PRE02-C
M | master-service-settings.c: 27 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | master-service-settings.c: 27 | Macro replacement list needs parentheses. | CERT PRE02-C
M | master-settings.c: 26 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | master-settings.c: 26 | Macro replacement list needs parentheses. | CERT PRE02-C
M | master-settings.c: 57 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | master-settings.c: 57 | Macro replacement list needs parentheses. | CERT PRE02-C
M | master-settings.c: 90 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | master-settings.c: 90 | Macro replacement list needs parentheses. | CERT PRE02-C
M | master-settings.c: 92 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C

Code | File: Src Line | Violation | Standard
--- | --- | --- | ---
M | master-settings.c: 92 | Macro replacement list needs parentheses. | CERT PRE02-C
M | master-settings.c: 94 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | master-settings.c: 94 | Macro replacement list needs parentheses. | CERT PRE02-C
M | master-settings.c: 165 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | master-settings.c: 165 | Macro replacement list needs parentheses. | CERT PRE02-C
M | master-settings.c: 167 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | master-settings.c: 167 | Macro replacement list needs parentheses. | CERT PRE02-C
M | llist.h: 5 | Macro replacement list needs parentheses. | CERT PRE02-C
M | llist.h: 12 | Macro replacement list needs parentheses. | CERT PRE02-C
M | llist.h: 25 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | llist.h: 25 | Macro replacement list needs parentheses. | CERT PRE02-C
M | llist.h: 32 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | llist.h: 32 | Macro replacement list needs parentheses. | CERT PRE02-C
M | llist.h: 39 | Macro replacement list needs parentheses. | CERT PRE02-C
M | master-service.c: 40 | Global not initialised at declaration. : master_service | CERT EXP33-C
M | service.c: 22 | Global not initialised at declaration. : service_pids | CERT EXP33-C
M | service-anvil.c: 17 | Global not initialised at declaration. : service_anvil_global | CERT EXP33-C

[ | Top of Report | | | Procedure Table | | | Contents | ]

array_create_i (93 to 101 array.h analysed in anvil-client.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 100 | Pointer not checked for null before use : buffer | CERT EXP08-C,EXP34-C
| 99 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

anvil_client_init (36 to 50 anvil-client.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 49 | Local structure returned in function result : client |
M | 43 | Pointer not checked for null before use : client | CERT EXP08-C,EXP34-C
| 42 |  |
M | 42 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| Ref. Line -1101 (Module 489) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

anvil_client_deinit (52 to 63 anvil-client.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 62 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 61 |  |
M | 61 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| Ref. Line -1101 (Module 489) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

anvil_input (77 to 103 anvil-client.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 90 | Pointer not checked for null before use : queries | CERT EXP08-C,EXP34-C
| 83 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

anvil_client_cancel_queries (130 to 141 anvil-client.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 137 | Pointer not checked for null before use : queries | CERT EXP08-C,EXP34-C
| 135 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

dup2_array (22 to 78 dup2-array.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 69 | Pointer not checked for null before use : dups | CERT EXP08-C,EXP34-C
| 29 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

process_exec (58 to 86 main.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 63 | Pointer not checked for null before use : argv | CERT EXP08-C,EXP34-C
| 62 |  |
M | 76 | Pointer not checked for null before use : new_argv | CERT EXP08-C,EXP34-C
| 74 |  |
M | 84 | Pointer not checked for null before use : argv | CERT EXP08-C,EXP34-C
| 84 |  |
M | 85 | Pointer not checked for null before use : executable | CERT EXP08-C,EXP34-C
| 63 |  |
M | 80 | Pointer not checked for null before use : argv | CERT EXP08-C,EXP34-C
| 76 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_fatal_callback (127 to 152 main.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 141 | Pointer not checked for null before use : path | CERT EXP08-C,EXP34-C
| 140 |  |
M | 145 | Pointer not checked for null before use : str | CERT EXP08-C,EXP34-C
| 144 |  |
M | 132 | Procedure contains UR data flow anomalies. : args2 | CERT EXP33-C
| 143 |  |
C | 127 | Procedure not called in code analysed : master_fatal_callback |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
main.c | 132 | main.c | 143 | args2

[ | Top of Report | | | Procedure Table | | | Contents | ]

startup_fatal_handler (154 to 165 main.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 158 | Procedure contains UR data flow anomalies. : args2 | CERT EXP33-C
| 160 |  |
C | 154 | Procedure not called in code analysed : startup_fatal_handler |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
main.c | 158 | main.c | 160 | args2

[ | Top of Report | | | Procedure Table | | | Contents | ]

startup_error_handler (167 to 176 main.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 170 | Procedure contains UR data flow anomalies. : args2 | CERT EXP33-C
| 172 |  |
C | 167 | Procedure not called in code analysed : startup_error_handler |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
main.c | 170 | main.c | 172 | args2

[ | Top of Report | | | Procedure Table | | | Contents | ]

fatal_log_check (178 to 202 main.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 186 | Pointer not checked for null before use : path | CERT EXP08-C,EXP34-C
| 185 |  |
M | 196 | User input not checked before use. : buf | CERT FIO30-C
| 194 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

pid_file_read (204 to 236 main.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 226 | Array Bound exceeded. | CERT ARR30-C
M | 229 | User input not checked before use. : buf | CERT FIO30-C
| 228 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

pid_file_check_running (238 to 247 main.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 240 | Procedure contains UR data flow anomalies. : pid | CERT EXP33-C
| 246 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
main.c | 240 | main.c | 246 | pid

[ | Top of Report | | | Procedure Table | | | Contents | ]

create_pid_file (249 to 262 main.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 259 | Pointer not checked for null before use : pid | CERT EXP08-C,EXP34-C
| 254 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

create_config_symlink (264 to 276 main.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 269 | Pointer not checked for null before use : base_config_path | CERT EXP08-C,EXP34-C
| 268 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

sig_settings_reload (278 to 343 main.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 308 | Pointer not checked for null before use : input.service | CERT EXP08-C,EXP34-C
| 304 |  |
M | 308 | Pointer not checked for null before use : input.username | CERT EXP08-C,EXP34-C
| 304 |  |
M | 308 | Pointer not checked for null before use : input.local_name | CERT EXP08-C,EXP34-C
| 304 |  |
M | 314 | Pointer not checked for null before use : sets | CERT EXP08-C,EXP34-C
| 313 |  |
M | 316 | Pointer not checked for null before use : set | CERT EXP08-C,EXP34-C
| 314 |  |
M | 342 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 339 |  |
M | 342 | Pointer not checked for null before use : service_anvil_global.io_blocking | CERT EXP08-C,EXP34-C
| 339 |  |
M | 342 | Pointer not checked for null before use : services | CERT EXP08-C,EXP34-C
| 341 |  |
M | 324 | Pointer not checked for null before use : new_services | CERT EXP08-C,EXP34-C
| 316 |  |
M | 310 | Pointer not checked for null before use : error | CERT EXP08-C,EXP34-C
| 308 |  |
M | 319 | Pointer not checked for null before use : error | CERT EXP08-C,EXP34-C
| 316 |  |
M | 329 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 327 |  |
M | 339 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 327 |  |
M | 288 | Procedure contains UR data flow anomalies. : error | CERT EXP33-C
| 308 |  |
C | 278 | Procedure not called in code analysed : sig_settings_reload |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
main.c | 288 | main.c | 308 | error

[ | Top of Report | | | Procedure Table | | | Contents | ]

sig_log_reopen (345 to 352 main.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
C | 345 | Procedure not called in code analysed : sig_log_reopen |

[ | Top of Report | | | Procedure Table | | | Contents | ]

sig_reap_children (354 to 358 main.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
C | 354 | Procedure not called in code analysed : sig_reap_children |

[ | Top of Report | | | Procedure Table | | | Contents | ]

sig_die (360 to 367 main.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
C | 360 | Procedure not called in code analysed : sig_die |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_settings_read (369 to 381 main.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 377 | Pointer not checked for null before use : input.module | CERT EXP08-C,EXP34-C
| 375 |  |
M | 377 | Pointer not checked for null before use : input.service | CERT EXP08-C,EXP34-C
| 375 |  |
M | 377 | Pointer not checked for null before use : input.username | CERT EXP08-C,EXP34-C
| 375 |  |
M | 377 | Pointer not checked for null before use : input.local_name | CERT EXP08-C,EXP34-C
| 375 |  |
M | 379 | Pointer not checked for null before use : error | CERT EXP08-C,EXP34-C
| 377 |  |
M | 373 | Procedure contains UR data flow anomalies. : error | CERT EXP33-C
| 377 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
main.c | 373 | main.c | 377 | error
main.c | 373 | main.c | 379 | error

[ | Top of Report | | | Procedure Table | | | Contents | ]

main_log_startup (383 to 394 main.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 386 | Procedure contains UR data flow anomalies. : core_limit | CERT EXP33-C
| 388 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
main.c | 386 | main.c | 388 | core_limit

[ | Top of Report | | | Procedure Table | | | Contents | ]

main_deinit (420 to 429 main.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 424 | free parameter is not heap item. | CERT MEM34-C
M | 426 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 424 |  |
M | 426 | Attempt to read from freed memory. : default_pool | CERT MEM30-C
M | 427 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 426 |  |
M | 427 | Attempt to read from freed memory. : default_pool | CERT MEM30-C
M | 428 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 427 |  |
M | 428 | Attempt to read from freed memory. : default_pool | CERT MEM30-C

[ | Top of Report | | | Procedure Table | | | Contents | ]

get_full_config_path (431 to 440 main.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 436 | Pointer not checked for null before use : path | CERT EXP08-C,EXP34-C
| 435 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_time_moved (442 to 458 main.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
C | 442 | Procedure not called in code analysed : master_time_moved |

[ | Top of Report | | | Procedure Table | | | Contents | ]

print_build_options (485 to 594 main.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 593 | Insufficient formats in output function. | CERT FIO00-C

[ | Top of Report | | | Procedure Table | | | Contents | ]

main (596 to 772 main.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 742 | Sizeof argument is a pointer. | CERT EXP01-C
M | 669 | Pointer not checked for null before use : args | CERT EXP08-C,EXP34-C
| 668 |  |
M | 724 | Pointer not checked for null before use : pidfile_path | CERT EXP08-C,EXP34-C
| 715 |  |
M | 739 | Pointer not checked for null before use : env | CERT EXP08-C,EXP34-C
| 737 |  |
M | 750 | Pointer not checked for null before use : service_anvil_global | CERT EXP08-C,EXP34-C
| 749 |  |
M | 768 | Pointer not checked for null before use : NULL | CERT EXP08-C,EXP34-C
M | 769 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 767 |  |
M | 769 | Pointer not checked for null before use : service_anvil_global.io_blocking | CERT EXP08-C,EXP34-C
| 767 |  |
M | 770 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 769 |  |
M | 704 | Pointer not checked for null before use : master_service | CERT EXP08-C,EXP34-C
| 624 |  |
M | 624 | Attempt to read from freed memory. : default_pool | CERT MEM30-C
M | 704 | Pointer not checked for null before use : master_service_setting_parser_info.module_name | CERT EXP08-C,EXP34-C
| Ref. Line 1 (main.c) |  |
M | 767 | Pointer not checked for null before use : service_anvil_global | CERT EXP08-C,EXP34-C
| 749 |  |
M | 767 | Pointer not checked for null before use : service_pids | CERT EXP08-C,EXP34-C
| 748 |  |
M | 715 | Pointer not checked for null before use : set | CERT EXP08-C,EXP34-C
| 704 |  |
M | 751 | Pointer not checked for null before use : error | CERT EXP08-C,EXP34-C
| 750 |  |
M | 769 | Procedure contains UR data flow anomalies. : (service_anvil_global)->kills | CERT EXP33-C
M | 750 | Procedure contains UR data flow anomalies. : (service_anvil_global)->status_fd | CERT EXP33-C
M | 767 | Procedure contains UR data flow anomalies. : (services)->(anvil)->log_fd | CERT EXP33-C
M | 767 | Procedure contains UR data flow anomalies. : (services)->anvil | CERT EXP33-C
M | 603 | Procedure contains UR data flow anomalies. : doubleopts | CERT EXP33-C
| 674 |  |
M | 600 | Procedure contains UR data flow anomalies. : error | CERT EXP33-C
| 751 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
[external declaration] |  | main.c | 767 | (service_anvil_global)->blocking_fd
[external declaration] |  | main.c | 769 | (service_anvil_global)->kills
[external declaration] |  | main.c | 767 | (service_anvil_global)->log_fdpass_fd
[external declaration] |  | main.c | 767 | (service_anvil_global)->nonblocking_fd
[external declaration] |  | main.c | 767 | (service_anvil_global)->pid
[external declaration] |  | main.c | 767 | (service_anvil_global)->process_count
[external declaration] |  | main.c | 750 | (service_anvil_global)->status_fd
[external declaration] |  | main.c | 767 | (service_anvil_global)->uid
[external declaration] |  | main.c | 767 | (services)->(anvil)->log_fd
[external declaration] |  | main.c | 767 | (services)->anvil
ioloop.h | 41 | main.c | 630 | current_ioloop
main.c | 603 | main.c | 674 | doubleopts
main.c | 600 | main.c | 751 | error
ioloop.h | 38 | main.c | 769 | ioloop_time
[external declaration] |  | main.c | 767 | service_anvil_global.blocking_fd
[external declaration] |  | main.c | 767 | service_anvil_global.io_blocking
[external declaration] |  | main.c | 767 | service_anvil_global.nonblocking_fd
common.h | 11 | main.c | 706 | ssl_manual_key_password

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_auth_init (43 to 57 master-auth.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 56 | Local structure returned in function result : auth |
M | 50 | Pointer not checked for null before use : pool | CERT EXP08-C,EXP34-C
| 49 |  |
M | 51 | Pointer not checked for null before use : auth | CERT EXP08-C,EXP34-C
| 50 |  |
M | 54 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| Ref. Line -1101 (Module 490) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_auth_deinit (86 to 104 master-auth.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 95 | Pointer not checked for null before use : value | CERT EXP08-C,EXP34-C
| 99 |  |
M | 90 | Procedure contains UR data flow anomalies. : key | CERT EXP33-C
| 95 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
master-auth.c | 90 | master-auth.c | 95 | key

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_auth_connection_input (106 to 144 master-auth.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 111 | Sizeof argument is a pointer. | CERT EXP01-C
M | 127 | Sizeof argument is a pointer. | CERT EXP01-C
M | 134 | Pointer not checked for null before use : reply | CERT EXP08-C,EXP34-C
| 131 |  |
M | 131 | User input not checked before use. : (conn)->buf | CERT FIO30-C
| 111 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_auth_connection_timeout (146 to 152 master-auth.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 148 | Sizeof argument is a pointer. | CERT EXP01-C

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_auth_request (154 to 216 master-auth.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 170 | Pointer not checked for null before use : conn | CERT EXP08-C,EXP34-C
| 169 |  |
M | 185 | Pointer not checked for null before use : buf | CERT EXP08-C,EXP34-C
| 183 |  |
M | 177 | Pointer not checked for null before use : auth | CERT EXP08-C,EXP34-C
| 175 |  |
M | 188 | Pointer not checked for null before use : auth | CERT EXP08-C,EXP34-C
| 177 |  |
M | 181 | User input not checked before use. : st | CERT FIO30-C
| 179 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_auth_init (51 to 64 master-login-auth.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 63 | Local structure returned in function result : auth |
M | 57 | Pointer not checked for null before use : pool | CERT EXP08-C,EXP34-C
| 56 |  |
M | 58 | Pointer not checked for null before use : auth | CERT EXP08-C,EXP34-C
| 57 |  |
M | 62 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| Ref. Line -1101 (Module 491) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_auth_disconnect (66 to 93 master-login-auth.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 72 | Pointer not checked for null before use : request | CERT EXP08-C,EXP34-C
| 71 |  |
M | 77 | Attempt to read from freed memory. : default_pool | CERT MEM30-C

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_auth_timeout (128 to 147 master-login-auth.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 135 | Pointer not checked for null before use : request | CERT EXP08-C,EXP34-C
| 134 |  |
M | 143 | Attempt to read from freed memory. : default_pool | CERT MEM30-C

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_auth_lookup_request (159 to 181 master-login-auth.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 180 | Local structure returned in function result : request |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_auth_input_user (183 to 205 master-login-auth.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 205 | Memory not freed after last reference. : request | CERT MEM00-C
M | 188 | Procedure contains UR data flow anomalies. : id | CERT EXP33-C
| 194 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
master-login-auth.c | 188 | master-login-auth.c | 194 | id
master-login-auth.c | 188 | master-login-auth.c | 199 | id

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_auth_input_notfound (207 to 227 master-login-auth.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 227 | Memory not freed after last reference. : request | CERT MEM00-C
M | 212 | Procedure contains UR data flow anomalies. : id | CERT EXP33-C
| 214 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
master-login-auth.c | 212 | master-login-auth.c | 214 | id

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_auth_input_fail (229 to 257 master-login-auth.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 257 | Memory not freed after last reference. : request | CERT MEM00-C
M | 235 | Procedure contains UR data flow anomalies. : id | CERT EXP33-C
| 238 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
master-login-auth.c | 235 | master-login-auth.c | 238 | id
master-login-auth.c | 235 | master-login-auth.c | 247 | id

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_auth_input (259 to 312 master-login-auth.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 307 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 298 |  |
M | 307 | Pointer not checked for null before use : auth.to | CERT EXP08-C,EXP34-C
| 298 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_auth_request (334 to 375 master-login-auth.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 361 | Sizeof argument is a pointer. | CERT EXP01-C
M | 366 | Pointer not checked for null before use : login_req | CERT EXP08-C,EXP34-C
| 365 |  |
M | 350 | Pointer not checked for null before use : str | CERT EXP08-C,EXP34-C
| 343 |  |
M | 359 | Pointer not checked for null before use : str | CERT EXP08-C,EXP34-C
| 343 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_init (61 to 79 master-login.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 78 | Local structure returned in function result : login |
M | 70 | Pointer not checked for null before use : login | CERT EXP08-C,EXP34-C
| 69 |  |
M | 69 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| Ref. Line -1101 (Module 492) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_deinit (81 to 99 master-login.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 98 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 97 |  |
M | 98 | Attempt to read from freed memory. : default_pool | CERT MEM30-C
M | 98 | Pointer not checked for null before use : (login)->postlogin_socket_path | CERT EXP08-C,EXP34-C
| 97 |  |
M | 97 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 90 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_conn_read_request (101 to 171 master-login.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 112 | Pointer not checked for null before use : client_fd_r | CERT EXP08-C,EXP34-C
| 110 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_client_free (173 to 189 master-login.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 188 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 187 |  |
M | 187 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 186 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_auth_finish (191 to 217 master-login.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 206 | Attempt to use already freed object. | CERT MEM31-C
M | 207 | Attempt to use already freed object. | CERT MEM31-C
M | 216 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 207 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_postlogin_free (219 to 228 master-login.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 227 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 226 |  |
M | 227 | Attempt to read from freed memory. : default_pool | CERT MEM30-C
M | 227 | Pointer not checked for null before use : (pl)->username | CERT EXP08-C,EXP34-C
| 226 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_postlogin_input (230 to 278 master-login.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 232 | Attempt to use already freed object. | CERT MEM31-C
M | 242 | Attempt to use already freed object. | CERT MEM31-C
M | 244 | Attempt to use already freed object. | CERT MEM31-C
M | 258 | Attempt to use already freed object. | CERT MEM31-C
M | 261 | Attempt to use already freed object. | CERT MEM31-C
M | 276 | Attempt to use already freed object. | CERT MEM31-C
M | 268 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 267 |  |
M | 273 | Pointer not checked for null before use : auth_args | CERT EXP08-C,EXP34-C
| 272 |  |
M | 274 | Pointer not checked for null before use : auth_args | CERT EXP08-C,EXP34-C
| 274 |  |
M | 277 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 276 |  |
M | 233 | Procedure contains UR data flow anomalies. : buf | CERT EXP33-C
| 239 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
master-login.c | 233 | master-login.c | 239 | buf

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_postlogin_timeout (280 to 289 master-login.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 282 | Attempt to use already freed object. | CERT MEM31-C
M | 284 | Attempt to use already freed object. | CERT MEM31-C
M | 288 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 287 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_postlogin (291 to 340 master-login.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 301 | Attempt to use already freed object. | CERT MEM31-C
M | 303 | Attempt to use already freed object. | CERT MEM31-C
M | 320 | Attempt to use already freed object. | CERT MEM31-C
M | 323 | Attempt to use already freed object. | CERT MEM31-C
M | 309 | Pointer not checked for null before use : str | CERT EXP08-C,EXP34-C
| 308 |  |
M | 332 | Pointer not checked for null before use : pl | CERT EXP08-C,EXP34-C
| 331 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_auth_callback (342 to 380 master-login.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 362 | Attempt to use already freed object. | CERT MEM31-C
M | 367 | Attempt to use already freed object. | CERT MEM31-C
M | 368 | Attempt to use already freed object. | CERT MEM31-C
M | 377 | Attempt to use already freed object. | CERT MEM31-C
M | 377 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 374 |  |
M | 378 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 374 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_conn_input (382 to 414 master-login.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 386 | Attempt to use already freed object. | CERT MEM31-C
M | 409 | Attempt to use already freed object. | CERT MEM31-C
M | 412 | Attempt to use already freed object. | CERT MEM31-C
M | 406 | Pointer not checked for null before use : client | CERT EXP08-C,EXP34-C
| 405 |  |
M | 387 | Procedure contains UR data flow anomalies. : data | CERT EXP33-C
| 409 |  |
M | 384 | Procedure contains UR data flow anomalies. : req.auth_id | CERT EXP33-C
| 408 |  |
M | 384 | Procedure contains UR data flow anomalies. : req.auth_pid | CERT EXP33-C
| 408 |  |
M | 384 | Procedure contains UR data flow anomalies. : req.client_pid | CERT EXP33-C
| 408 |  |
M | 384 | Procedure contains UR data flow anomalies. : req.cookie | CERT EXP33-C
| 408 |  |
M | 384 | Procedure contains UR data flow anomalies. : req.data_size | CERT EXP33-C
| 390 |  |
M | 384 | Procedure contains UR data flow anomalies. : req.flags | CERT EXP33-C
| 408 |  |
M | 384 | Procedure contains UR data flow anomalies. : req.ino | CERT EXP33-C
| 390 |  |
M | 384 | Procedure contains UR data flow anomalies. : req.local_ip.family | CERT EXP33-C
| 408 |  |
M | 384 | Procedure contains UR data flow anomalies. : req.local_ip.u.ip4 | CERT EXP33-C
| 408 |  |
M | 384 | Procedure contains UR data flow anomalies. : req.local_ip.u.ip6 | CERT EXP33-C
| 408 |  |
M | 384 | Procedure contains UR data flow anomalies. : req.remote_ip.family | CERT EXP33-C
| 408 |  |
M | 384 | Procedure contains UR data flow anomalies. : req.remote_ip.u.ip4 | CERT EXP33-C
| 408 |  |
M | 384 | Procedure contains UR data flow anomalies. : req.remote_ip.u.ip6 | CERT EXP33-C
| 408 |  |
M | 384 | Procedure contains UR data flow anomalies. : req.tag | CERT EXP33-C
| 408 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
master-login.c | 387 | master-login.c | 409 | data
master-login.c | 384 | master-login.c | 408 | req.auth_id
master-login.c | 384 | master-login.c | 408 | req.auth_pid
master-login.c | 384 | master-login.c | 408 | req.client_pid
master-login.c | 384 | master-login.c | 408 | req.cookie
master-login.c | 384 | master-login.c | 390 | req.data_size
master-login.c | 384 | master-login.c | 405 | req.data_size
master-login.c | 384 | master-login.c | 408 | req.flags
master-login.c | 384 | master-login.c | 390 | req.ino
master-login.c | 384 | master-login.c | 408 | req.ino
master-login.c | 384 | master-login.c | 408 | req.local_ip.family
master-login.c | 384 | master-login.c | 408 | req.local_ip.u.ip4
master-login.c | 384 | master-login.c | 408 | req.local_ip.u.ip6
master-login.c | 384 | master-login.c | 408 | req.remote_ip.family
master-login.c | 384 | master-login.c | 408 | req.remote_ip.u.ip4
master-login.c | 384 | master-login.c | 408 | req.remote_ip.u.ip6
master-login.c | 384 | master-login.c | 408 | req.tag

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_add (416 to 430 master-login.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 421 | Pointer not checked for null before use : conn | CERT EXP08-C,EXP34-C
| 420 |  |
M | 420 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| Ref. Line -1101 (Module 492) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_conn_close (432 to 445 master-login.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 437 | Attempt to use already freed object. | CERT MEM31-C

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_login_conn_unref (447 to 463 master-login.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 463 | Memory not freed after last reference. : conn | CERT MEM00-C

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_service_settings_cache_init (55 to 70 master-service-settings-cache.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 69 | Local structure returned in function result : cache |
M | 63 | Pointer not checked for null before use : pool | CERT EXP08-C,EXP34-C
| 62 |  |
M | 64 | Pointer not checked for null before use : cache | CERT EXP08-C,EXP34-C
| 63 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_service_settings_cache_deinit (72 to 95 master-service-settings-cache.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 80 | Pointer not checked for null before use : next | CERT EXP08-C,EXP34-C
| 79 |  |
M | 85 | Pointer not checked for null before use : next | CERT EXP08-C,EXP34-C
| 84 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

cache_add (169 to 252 master-service-settings-cache.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 198 | Pointer not checked for null before use : pool | CERT EXP08-C,EXP34-C
| 197 |  |
M | 202 | Pointer not checked for null before use : entry | CERT EXP08-C,EXP34-C
| 201 |  |
M | 204 | Pointer not checked for null before use : pool | CERT EXP08-C,EXP34-C
| 202 |  |
M | 210 | Pointer not checked for null before use : pool | CERT EXP08-C,EXP34-C
| 209 |  |
M | 214 | Pointer not checked for null before use : entry_local_name | CERT EXP08-C,EXP34-C
| 213 |  |
M | 212 | Pointer not checked for null before use : entry | CERT EXP08-C,EXP34-C
| 198 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_service_settings_cache_read (254 to 300 master-service-settings-cache.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 285 | Pointer not checked for null before use : set | CERT EXP08-C,EXP34-C
| 284 |  |
M | 275 | Pointer not checked for null before use : new_input.local_name | CERT EXP08-C,EXP34-C
| 270 |  |
M | 275 | Pointer not checked for null before use : new_input.username | CERT EXP08-C,EXP34-C
| 270 |  |
M | 275 | Pointer not checked for null before use : new_input.service | CERT EXP08-C,EXP34-C
| 270 |  |
M | 275 | Pointer not checked for null before use : new_input.module | CERT EXP08-C,EXP34-C
| 270 |  |
M | 272 | Pointer not checked for null before use : new_input.roots | CERT EXP08-C,EXP34-C
| 270 |  |
M | 260 | Procedure contains UR data flow anomalies. : output.service_uses_local | CERT EXP33-C
| 281 |  |
M | 260 | Procedure contains UR data flow anomalies. : output.service_uses_remote | CERT EXP33-C
| 282 |  |
M | 260 | Procedure contains UR data flow anomalies. : output.specific_services | CERT EXP33-C
| 297 |  |
M | 260 | Procedure contains UR data flow anomalies. : output.used_local | CERT EXP33-C
| 288 |  |
M | 260 | Procedure contains UR data flow anomalies. : output.used_remote | CERT EXP33-C
| 292 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
master-service-settings-cache.c | 260 | master-service-settings-cache.c | 281 | output.service_uses_local
master-service-settings-cache.c | 260 | master-service-settings-cache.c | 282 | output.service_uses_remote
master-service-settings-cache.c | 260 | master-service-settings-cache.c | 297 | output.specific_services
master-service-settings-cache.c | 260 | master-service-settings-cache.c | 288 | output.used_local
master-service-settings-cache.c | 260 | master-service-settings-cache.c | 292 | output.used_remote

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_service_exec_config (84 to 109 master-service-settings.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 90 | Pointer not checked for null before use : binary_path | CERT EXP08-C,EXP34-C
| 88 |  |
M | 108 | Pointer not checked for null before use : conf_argv | CERT EXP08-C,EXP34-C
| 106 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

config_exec_fallback (111 to 128 master-service-settings.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 123 | Pointer not checked for null before use : path | CERT EXP08-C,EXP34-C
| 121 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_service_open_config (130 to 179 master-service-settings.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 163 | Pointer not checked for null before use : path | CERT EXP08-C,EXP34-C
| 139 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

config_send_request (201 to 220 master-service-settings.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 211 | Pointer not checked for null before use : str | CERT EXP08-C,EXP34-C
| 210 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_service_apply_config_overrides (222 to 242 master-service-settings.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 232 | Pointer not checked for null before use : overrides | CERT EXP08-C,EXP34-C
| 230 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

config_read_reply_header (244 to 292 master-service-settings.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 283 | Pointer not checked for null before use : name | CERT EXP08-C,EXP34-C
| 282 |  |
M | 272 | Pointer not checked for null before use : arg | CERT EXP08-C,EXP34-C
| 268 |  |
M | 283 | Pointer not checked for null before use : (arr)->buffer | CERT EXP08-C,EXP34-C
| 271 |  |
M | 283 | Pointer not checked for null before use : (arr)->element_size | CERT EXP08-C,EXP34-C
| 271 |  |
M | 250 | Procedure contains UR data flow anomalies. : line | CERT EXP33-C
| 268 |  |
M | 269 | Declaration types do not match across a system. : services | CERT ARR31-C
| 13 (common.h) |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
master-service-settings.c | 250 | master-service-settings.c | 268 | line

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_service_settings_read (294 to 423 master-service-settings.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 335 | Pointer not checked for null before use : (arr)->buffer | CERT EXP08-C,EXP34-C
| 333 |  |
M | 335 | Pointer not checked for null before use : (arr)->element_size | CERT EXP08-C,EXP34-C
| 333 |  |
M | 407 | Pointer not checked for null before use : sets | CERT EXP08-C,EXP34-C
| 406 |  |
M | 351 | Pointer not checked for null before use : output_r | CERT EXP08-C,EXP34-C
| 309 |  |
M | 351 | Pointer not checked for null before use : error_r | CERT EXP08-C,EXP34-C
| 358 |  |
M | 355 | Pointer not checked for null before use : parser | CERT EXP08-C,EXP34-C
| 341 |  |
M | 317 | Pointer not checked for null before use : path | CERT EXP08-C,EXP34-C
| 313 |  |
M | 303 | Procedure contains UR data flow anomalies. : error | CERT EXP33-C
| 401 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
master-service-settings.c | 303 | master-service-settings.c | 401 | error

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_service_settings_read_simple (425 to 436 master-service-settings.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 435 | Pointer not checked for null before use : input.local_name | CERT EXP08-C,EXP34-C
| 432 |  |
M | 435 | Pointer not checked for null before use : input.username | CERT EXP08-C,EXP34-C
| 432 |  |
M | 435 | Pointer not checked for null before use : input.service | CERT EXP08-C,EXP34-C
| 432 |  |
M | 435 | Pointer not checked for null before use : input.module | CERT EXP08-C,EXP34-C
| 434 |  |
M | 435 | Pointer not checked for null before use : input.config_path | CERT EXP08-C,EXP34-C
| 432 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_service_set_has_config_override (466 to 495 master-service-settings.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 484 | Pointer not checked for null before use : okey | CERT EXP08-C,EXP34-C
| 483 |  |
M | 488 | Pointer not checked for null before use : key_root | CERT EXP08-C,EXP34-C
| 477 |  |
M | 488 | Pointer not checked for null before use : okey_root | CERT EXP08-C,EXP34-C
| 487 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_service_init (94 to 183 master-service.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 182 | Local structure returned in function result : service |
M | 139 | Pointer not checked for null before use : service | CERT EXP08-C,EXP34-C
| 138 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_service_init_log (197 to 259 master-service.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 223 | Pointer not checked for null before use : path | CERT EXP08-C,EXP34-C
| 222 |  |
M | 248 | Pointer not checked for null before use : path | CERT EXP08-C,EXP34-C
| 247 |  |
M | 255 | Pointer not checked for null before use : path | CERT EXP08-C,EXP34-C
| 254 |  |
M | 230 | Procedure contains UR data flow anomalies. : facility | CERT EXP33-C
| 235 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
master-service.c | 230 | master-service.c | 235 | facility

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_service_set_client_limit (427 to 441 master-service.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 430 | Declaration types do not match across a system. : used | CERT ARR31-C

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_service_set_service_count (448 to 462 master-service.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 451 | Declaration types do not match across a system. : used | CERT ARR31-C

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_service_deinit (651 to 686 master-service.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 681 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 680 |  |
M | 681 | Attempt to read from freed memory. : default_pool | CERT MEM30-C
M | 682 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 681 |  |
M | 682 | Attempt to read from freed memory. : default_pool | CERT MEM30-C
M | 683 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 682 |  |
M | 683 | Attempt to read from freed memory. : default_pool | CERT MEM30-C
M | 681 | Procedure contains UR data flow anomalies. : service.getopt_str | CERT EXP33-C
M | 680 | Procedure contains UR data flow anomalies. : service.listeners | CERT EXP33-C
M | 682 | Procedure contains UR data flow anomalies. : service.name | CERT EXP33-C

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
master-service.c | 681 | master-service.c | 683 | service.getopt_str
master-service.c | 680 | master-service.c | 683 | service.listeners
master-service.c | 682 | master-service.c | 683 | service.name

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_service_listen (688 to 741 master-service.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 739 | Pointer not checked for null before use : service.master_status.pid | CERT EXP08-C,EXP34-C
| 732 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

io_listeners_init (743 to 762 master-service.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 750 | Attempt to use already freed object. | CERT MEM31-C

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_status_update (830 to 894 master-service.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 864 | Sizeof argument is a pointer. | CERT EXP01-C
M | 866 | Sizeof argument is a pointer. | CERT EXP01-C

[ | Top of Report | | | Procedure Table | | | Contents | ]

version_string_verify (896 to 915 master-service.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 906 | Pointer not checked for null before use : line | CERT EXP08-C,EXP34-C
| 904 |  |
M | 912 | Pointer not checked for null before use : line | CERT EXP08-C,EXP34-C
| 909 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

add_inet_listeners (282 to 299 master-settings.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 296 | Pointer not checked for null before use : str | CERT EXP08-C,EXP34-C
| 295 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

services_have_protocol (334 to 346 master-settings.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 337 | Declaration types do not match across a system. : services | CERT ARR31-C
| 13 (common.h) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_settings_verify (348 to 497 master-settings.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 385 | Pointer not checked for null before use : services | CERT EXP08-C,EXP34-C
| 383 |  |
M | 355 | Procedure contains UR data flow anomalies. : all_listeners.arr.element_size | CERT EXP33-C
| 488 |  |
M | 355 | Procedure contains UR data flow anomalies. : all_listeners.arr.buffer | CERT EXP33-C
| 488 |  |
M | 353 | Declaration types do not match across a system. : services | CERT ARR31-C
| 13 (common.h) |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
master-settings.c | 355 | master-settings.c | 488 | all_listeners.arr.element_size
master-settings.c | 355 | master-settings.c | 488 | all_listeners.arr.buffer

[ | Top of Report | | | Procedure Table | | | Contents | ]

login_want_core_dumps (500 to 522 master-settings.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 503 | Declaration types do not match across a system. : services | CERT ARR31-C
| 13 (common.h) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

settings_have_auth_unix_listeners_in (524 to 544 master-settings.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 528 | Declaration types do not match across a system. : services | CERT ARR31-C
| 13 (common.h) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

unlink_sockets (546 to 597 master-settings.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 569 | Pointer not checked for null before use : str | CERT EXP08-C,EXP34-C
| 561 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

master_settings_do_fixes (599 to 663 master-settings.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 636 | Pointer not checked for null before use : login_dir | CERT EXP08-C,EXP34-C
| 635 |  |
M | 658 | Pointer not checked for null before use : empty_dir | CERT EXP08-C,EXP34-C
| 657 |  |
M | 651 | Pointer not checked for null before use : login_dir | CERT EXP08-C,EXP34-C
| 635 |  |
M | 643 | Pointer not checked for null before use : login_dir | CERT EXP08-C,EXP34-C
| 635 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_process_write_anvil_kill (79 to 91 service-anvil.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 85 | Pointer not checked for null before use : data | CERT EXP08-C,EXP34-C
| 84 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_anvil_monitor_start (93 to 103 service-anvil.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 101 | Pointer not checked for null before use : service | CERT EXP08-C,EXP34-C
| 100 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_anvil_process_created (105 to 118 service-anvil.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 112 | Pointer not checked for null before use : service_anvil_global | CERT EXP08-C,EXP34-C
| Ref. Line -2561 (Module 778) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_anvil_send_log_fd (130 to 144 service-anvil.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 133 | Procedure contains UR data flow anomalies. : b | CERT EXP33-C
| 138 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
service-anvil.c | 133 | service-anvil.c | 138 | b

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_anvil_global_init (146 to 176 service-anvil.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 151 | Pointer not checked for null before use : anvil | CERT EXP08-C,EXP34-C
| 150 |  |
M | 150 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| Ref. Line -1101 (Module 778) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_anvil_global_deinit (178 to 203 service-anvil.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 180 | Pointer not checked for null before use : service_anvil_global | CERT EXP08-C,EXP34-C
| Ref. Line -2561 (Module 778) |  |
M | 183 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| Ref. Line -1101 (Module 778) |  |
M | 200 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 183 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

services_listen (193 to 204 service-listen.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 195 | Declaration types do not match across a system. : services | CERT ARR31-C
| 13 (common.h) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

listener_equals (206 to 229 service-listen.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 221 | Sizeof argument is a pointer. | CERT EXP01-C

[ | Top of Report | | | Procedure Table | | | Contents | ]

services_listen_using (231 to 310 service-listen.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 264 | Pointer not checked for null before use : services | CERT EXP08-C,EXP34-C
| 262 |  |
M | 269 | Pointer not checked for null before use : services | CERT EXP08-C,EXP34-C
| 267 |  |
M | 244 | Pointer not checked for null before use : new_service | CERT EXP08-C,EXP34-C
| 241 |  |
M | 247 | Pointer not checked for null before use : new_listeners | CERT EXP08-C,EXP34-C
| 244 |  |
M | 247 | Pointer not checked for null before use : old_listeners | CERT EXP08-C,EXP34-C
| 245 |  |
M | 264 | Pointer not checked for null before use : (arr)->buffer | CERT EXP08-C,EXP34-C
| 261 |  |
M | 269 | Pointer not checked for null before use : (arr)->buffer | CERT EXP08-C,EXP34-C
| 266 |  |
M | 238 | Procedure contains UR data flow anomalies. : new_count | CERT EXP33-C
| 246 |  |
M | 235 | Procedure contains UR data flow anomalies. : new_listeners_arr.arr.buffer | CERT EXP33-C
| 272 |  |
M | 235 | Procedure contains UR data flow anomalies. : new_listeners_arr.arr.element_size | CERT EXP33-C
| 272 |  |
M | 238 | Procedure contains UR data flow anomalies. : old_count | CERT EXP33-C
| 246 |  |
M | 236 | Procedure contains UR data flow anomalies. : old_listeners_arr.arr.buffer | CERT EXP33-C
| 273 |  |
M | 236 | Procedure contains UR data flow anomalies. : old_listeners_arr.arr.element_size | CERT EXP33-C
| 273 |  |
M | 234 | Declaration types do not match across a system. : services | CERT ARR31-C
| 13 (common.h) |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
service-listen.c | 238 | service-listen.c | 246 | new_count
service-listen.c | 235 | service-listen.c | 272 | new_listeners_arr.arr.buffer
service-listen.c | 235 | service-listen.c | 272 | new_listeners_arr.arr.element_size
service-listen.c | 238 | service-listen.c | 246 | old_count
service-listen.c | 236 | service-listen.c | 273 | old_listeners_arr.arr.buffer
service-listen.c | 236 | service-listen.c | 273 | old_listeners_arr.arr.element_size

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_process_write_log_bye (53 to 67 service-log.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 61 | Pointer not checked for null before use : data | CERT EXP08-C,EXP34-C
| 58 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

services_log_init (69 to 114 service-log.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 98 | Pointer not checked for null before use : log_prefix | CERT EXP08-C,EXP34-C
| 97 |  |
M | 77 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| Ref. Line -1101 (Module 780) |  |
M | 71 | Declaration types do not match across a system. : services | CERT ARR31-C
| 13 (common.h) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

services_log_deinit (116 to 147 service-log.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 123 | Pointer not checked for null before use : services | CERT EXP08-C,EXP34-C
| 121 |  |
M | 118 | Declaration types do not match across a system. : services | CERT ARR31-C
| 13 (common.h) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

services_log_dup2 (149 to 170 service-log.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 168 | Pointer not checked for null before use : fd_count | CERT EXP08-C,EXP34-C
| 158 |  |
M | 153 | Declaration types do not match across a system. : services | CERT ARR31-C
| 13 (common.h) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_status_input_one (116 to 160 service-monitor.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 122 | Pointer not checked for null before use : service_pids | CERT EXP08-C,EXP34-C
| Ref. Line -2378 (Module 781) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_status_input (162 to 187 service-monitor.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 186 | User input not checked before use. : status | CERT FIO30-C
| 168 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_login_create_notify_fd (292 to 323 service-monitor.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 303 | Pointer not checked for null before use : prefix | CERT EXP08-C,EXP34-C
| 300 |  |
M | 312 | Pointer not checked for null before use : path | CERT EXP08-C,EXP34-C
| 307 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

services_monitor_start (325 to 362 service-monitor.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 330 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 329 |  |
M | 360 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 329 |  |
M | 327 | Declaration types do not match across a system. : services | CERT ARR31-C
| 13 (common.h) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

services_monitor_stop (396 to 404 service-monitor.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 398 | Declaration types do not match across a system. : services | CERT ARR31-C
| 13 (common.h) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_process_failure (406 to 415 service-monitor.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 413 | Pointer not checked for null before use : service_anvil_global | CERT EXP08-C,EXP34-C
| Ref. Line -2561 (Module 781) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

services_monitor_reap_children (417 to 461 service-monitor.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 436 | Pointer not checked for null before use : service | CERT EXP08-C,EXP34-C
| 433 |  |
M | 442 | Pointer not checked for null before use : service | CERT EXP08-C,EXP34-C
| 433 |  |
M | 455 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 449 |  |
M | 461 | Memory not freed after last reference. : process | CERT MEM00-C
M | 422 | Procedure contains UR data flow anomalies. : status | CERT EXP33-C
| 425 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
service-monitor.c | 422 | service-monitor.c | 425 | status

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_process_notify_init (20 to 33 service-process-notify.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 32 | Local structure returned in function result : notify |
M | 27 | Pointer not checked for null before use : notify | CERT EXP08-C,EXP34-C
| 26 |  |
M | 26 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| Ref. Line -1101 (Module 782) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_process_notify_reset (35 to 53 service-process-notify.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 47 | Pointer not checked for null before use : process | CERT EXP08-C,EXP34-C
| 46 |  |
M | 46 | Pointer not checked for null before use : processes | CERT EXP08-C,EXP34-C
| 43 |  |
M | 53 | Memory not freed after last reference. : process | CERT MEM00-C

[ | Top of Report | | | Procedure Table | | | Contents | ]

notify_flush (55 to 72 service-process-notify.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 61 | Pointer not checked for null before use : processes | CERT EXP08-C,EXP34-C
| 60 |  |
M | 72 | Memory not freed after last reference. : process | CERT MEM00-C

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_process_notify_deinit (74 to 86 service-process-notify.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 80 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| Ref. Line -1101 (Module 782) |  |
M | 85 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 80 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_dup_fds (38 to 142 service-process.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 80 | Pointer not checked for null before use : listeners | CERT EXP08-C,EXP34-C
| 53 |  |
M | 42 | Procedure contains UR data flow anomalies. : dups.arr.buffer | CERT EXP33-C
| 59 |  |
M | 42 | Procedure contains UR data flow anomalies. : dups.arr.element_size | CERT EXP33-C
| 59 |  |
M | 42 | Procedure contains UR data flow anomalies. : dups.v | CERT EXP33-C
| 59 |  |
M | 42 | Procedure contains UR data flow anomalies. : dups.v_modifiable | CERT EXP33-C
| 64 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
service-process.c | 42 | service-process.c | 59 | dups.arr.buffer
service-process.c | 42 | service-process.c | 83 | dups.arr.buffer
service-process.c | 42 | service-process.c | 117 | dups.arr.buffer
service-process.c | 42 | service-process.c | 59 | dups.arr.element_size
service-process.c | 42 | service-process.c | 83 | dups.arr.element_size
service-process.c | 42 | service-process.c | 117 | dups.arr.element_size
service-process.c | 42 | service-process.c | 59 | dups.v
service-process.c | 42 | service-process.c | 83 | dups.v
service-process.c | 42 | service-process.c | 117 | dups.v
service-process.c | 42 | service-process.c | 64 | dups.v_modifiable
service-process.c | 42 | service-process.c | 59 | dups.v_modifiable
service-process.c | 42 | service-process.c | 83 | dups.v_modifiable
service-process.c | 42 | service-process.c | 117 | dups.v_modifiable

[ | Top of Report | | | Procedure Table | | | Contents | ]

drop_privileges (144 to 174 service-process.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 172 | Pointer not checked for null before use : rset.chroot_dir | CERT EXP08-C,EXP34-C
| 164 |  |
M | 170 | Pointer not checked for null before use : rset.extra_groups | CERT EXP08-C,EXP34-C
| 166 |  |
M | 172 | Pointer not checked for null before use : rset.extra_groups | CERT EXP08-C,EXP34-C
| 166 |  |
M | 147 | Procedure contains UR data flow anomalies. : rset.chroot_dir | CERT EXP33-C
| 154 |  |
M | 147 | Procedure contains UR data flow anomalies. : rset.extra_groups | CERT EXP33-C
| 154 |  |
M | 147 | Procedure contains UR data flow anomalies. : rset.first_valid_gid | CERT EXP33-C
| 154 |  |
M | 147 | Procedure contains UR data flow anomalies. : rset.gid | CERT EXP33-C
| 154 |  |
M | 147 | Procedure contains UR data flow anomalies. : rset.last_valid_gid | CERT EXP33-C
| 154 |  |
M | 147 | Procedure contains UR data flow anomalies. : rset.privileged_gid | CERT EXP33-C
| 154 |  |
M | 147 | Procedure contains UR data flow anomalies. : rset.system_groups_user | CERT EXP33-C
| 154 |  |
M | 147 | Procedure contains UR data flow anomalies. : rset.uid | CERT EXP33-C
| 154 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
service-process.c | 147 | service-process.c | 154 | rset.chroot_dir
service-process.c | 147 | service-process.c | 154 | rset.extra_groups
service-process.c | 147 | service-process.c | 154 | rset.first_valid_gid
service-process.c | 147 | service-process.c | 154 | rset.gid
service-process.c | 147 | service-process.c | 154 | rset.last_valid_gid
service-process.c | 147 | service-process.c | 154 | rset.privileged_gid
service-process.c | 147 | service-process.c | 154 | rset.system_groups_user
service-process.c | 147 | service-process.c | 154 | rset.uid

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_process_setup_environment (176 to 225 service-process.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 184 | Pointer not checked for null before use : p | CERT EXP08-C,EXP34-C
| 184 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_process_create (240 to 299 service-process.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 298 | Local structure returned in function result : process |
M | 274 | Pointer not checked for null before use : NULL | CERT EXP08-C,EXP34-C
M | 278 | Pointer not checked for null before use : process | CERT EXP08-C,EXP34-C
| 277 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_process_log (454 to 474 service-process.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 469 | Pointer not checked for null before use : data | CERT EXP08-C,EXP34-C
| 466 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_process_log_status_error (476 to 492 service-process.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 487 | Pointer not checked for null before use : str | CERT EXP08-C,EXP34-C
| 484 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_create_file_listener (34 to 54 service.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 53 | Local structure returned in function result : l |
M | 44 | Pointer not checked for null before use : l | CERT EXP08-C,EXP34-C
| 43 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

resolve_ip (56 to 98 service.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 67 | Pointer not checked for null before use : ip_list | CERT EXP08-C,EXP34-C
| 66 |  |
M | 76 | Pointer not checked for null before use : ip_list | CERT EXP08-C,EXP34-C
| 75 |  |
M | 60 | Procedure contains UR data flow anomalies. : ip_list | CERT EXP33-C
| 83 |  |
M | 61 | Procedure contains UR data flow anomalies. : ips_count | CERT EXP33-C
| 83 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
service.c | 60 | service.c | 83 | ip_list
service.c | 61 | service.c | 83 | ips_count

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_create_one_inet_listener (100 to 124 service.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 123 | Local structure returned in function result : l |
M | 111 | Pointer not checked for null before use : l | CERT EXP08-C,EXP34-C
| 110 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_create_inet_listeners (126 to 170 service.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 150 | Pointer not checked for null before use : tmp | CERT EXP08-C,EXP34-C
| 149 |  |
M | 149 | Pointer not checked for null before use : addresses | CERT EXP08-C,EXP34-C
| 146 |  |
M | 133 | Procedure contains UR data flow anomalies. : ips | CERT EXP33-C
| 156 |  |
M | 134 | Procedure contains UR data flow anomalies. : ips_count | CERT EXP33-C
| 159 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
service.c | 133 | service.c | 156 | ips
service.c | 134 | service.c | 159 | ips_count

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_create (172 to 328 service.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 327 | Local structure returned in function result : service |
M | 186 | Pointer not checked for null before use : service | CERT EXP08-C,EXP34-C
| 185 |  |
M | 293 | Pointer not checked for null before use : unix_listeners | CERT EXP08-C,EXP34-C
| 268 |  |
M | 305 | Pointer not checked for null before use : fifo_listeners | CERT EXP08-C,EXP34-C
| 274 |  |
M | 317 | Pointer not checked for null before use : inet_listeners | CERT EXP08-C,EXP34-C
| 280 |  |
M | 231 | Pointer not checked for null before use : tmp | CERT EXP08-C,EXP34-C
| 230 |  |
M | 241 | Pointer not checked for null before use : str | CERT EXP08-C,EXP34-C
| 229 |  |
M | 232 | Procedure contains UR data flow anomalies. : gid | CERT EXP33-C
| 239 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
service.c | 232 | service.c | 239 | gid

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_lookup (345 to 357 service.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 354 | Local structure returned in function result : service |
M | 348 | Declaration types do not match across a system. : services | CERT ARR31-C
| 13 (common.h) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_lookup_type (359 to 371 service.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 368 | Local structure returned in function result : service |
M | 362 | Declaration types do not match across a system. : services | CERT ARR31-C
| 13 (common.h) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_want (373 to 385 service.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 380 | Pointer not checked for null before use : proto | CERT EXP08-C,EXP34-C
| 380 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

services_create (387 to 464 service.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 400 | Pointer not checked for null before use : pool | CERT EXP08-C,EXP34-C
| 398 |  |
M | 401 | Pointer not checked for null before use : service_list | CERT EXP08-C,EXP34-C
| 400 |  |
M | 413 | Pointer not checked for null before use : service_settings | CERT EXP08-C,EXP34-C
| 409 |  |
M | 418 | Pointer not checked for null before use : error | CERT EXP08-C,EXP34-C
| 415 |  |
M | 449 | Pointer not checked for null before use : (arr)->buffer | CERT EXP08-C,EXP34-C
| 410 |  |
M | 449 | Pointer not checked for null before use : (arr)->element_size | CERT EXP08-C,EXP34-C
| 410 |  |
M | 395 | Procedure contains UR data flow anomalies. : error | CERT EXP33-C
| 418 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
service.c | 395 | service.c | 418 | error

[ | Top of Report | | | Procedure Table | | | Contents | ]

services_kill_timeout (531 to 562 service.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 533 | Declaration types do not match across a system. : services | CERT ARR31-C
| 13 (common.h) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

services_destroy (564 to 580 service.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 569 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| 567 |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_drop_listener_connections (616 to 637 service.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 619 | Procedure contains UR data flow anomalies. : fd | CERT EXP33-C
| 629 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
service.c | 619 | service.c | 629 | fd

[ | Top of Report | | | Procedure Table | | | Contents | ]

services_throttle_time_sensitives (652 to 663 service.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 655 | Declaration types do not match across a system. : services | CERT ARR31-C
| 13 (common.h) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_pids_init (665 to 669 service.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 667 | Pointer not checked for null before use : default_pool | CERT EXP08-C,EXP34-C
| Ref. Line -1101 (Module 784) |  |

[ | Top of Report | | | Procedure Table | | | Contents | ]

service_pids_deinit (671 to 682 service.c) - FAIL

#### Standards Violation Summary

Code | Violation | Standard
--- | --- | ---
M | Procedure contains UR data flow anomalies. | CERT EXP33-C

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 677 | Pointer not checked for null before use : service_pids | CERT EXP08-C,EXP34-C
| Ref. Line -2378 (Module 784) |  |
M | 678 | Pointer not checked for null before use : value | CERT EXP08-C,EXP34-C
| 679 |  |
M | 682 | Memory not freed after last reference. : value | CERT MEM00-C
M | 674 | Procedure contains UR data flow anomalies. : key | CERT EXP33-C
| 678 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
service.c | 674 | service.c | 678 | key

[ | Top of Report | | | Procedure Table | | | Contents | ]

### End of Code Review Report

###

### Copyright © 2010 Liverpool Data Research Associates