LDRA Testbed ® Code Review Report

System : Dovecot-src-lmtp






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 22:15:37
  • 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
Report on Program Components

Overall Quality Summary



Totals for Violated Quality Standards


Number of Violations LDRA Code (M) Mandatory Standards CERT Code
76 77 S Macro replacement list needs parentheses. CERT PRE02-C
50 78 S Macro parameter not in brackets. CERT PRE01-C,PRE02-C
1 577 S Sizeof argument is a pointer. CERT EXP01-C
16 5 D Procedure contains UR data flow anomalies. CERT EXP33-C
86 45 D Pointer not checked for null before use CERT EXP08-C,EXP34-C
2 57 D Global not initialised at declaration. CERT EXP33-C
29 69 D Procedure contains UR data flow anomalies. CERT EXP33-C
4 77 D Local structure returned in function result  
2 1 X Declaration types do not match across a system. CERT ARR31-C


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


Number of Violations LDRA Code (O) Optional Standards CERT Code

No Optional Standards Violated

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 93 program components, 50 (53.76 %) pass ( of which 0 conditionally pass ) and 43 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 client.c 0 0
Pass buffer_get_used_size buffer.h analysed in client.c 0 0
Pass array_create_from_buffer_i array.h analysed in client.c 0 0
FAIL array_create_i array.h analysed in client.c 1 - 17 -
Pass array_free_i array.h analysed in client.c 0 0
Pass array_is_created_i array.h analysed in client.c 0 0
Pass array_get_pool_i array.h analysed in client.c 0 0
Pass array_clear_i array.h analysed in client.c 0 0
Pass array_append_i array.h analysed in client.c 0 0
Pass array_append_array_i array.h analysed in client.c 0 0
Pass array_insert_i array.h analysed in client.c 0 0
Pass array_delete_i array.h analysed in client.c 0 0
Pass array_get_i array.h analysed in client.c 0 0
Pass array_idx_i array.h analysed in client.c 0 0
Pass array_get_modifiable_i array.h analysed in client.c 0 0
Pass array_append_space_i array.h analysed in client.c 0 0
Pass array_copy array.h analysed in client.c 0 0
Pass array_count_i array.h analysed in client.c 0 0
Pass client_idle_timeout client.c 0 0
FAIL client_input_line client.c 1 - 2 -
FAIL client_input_read client.c 1 - 4 -
FAIL client_input_handle client.c 1 - 4 -
FAIL client_input client.c 1 - 14 -
FAIL client_raw_user_create client.c 4 - 17 -
FAIL client_read_settings client.c 3 - 21 -
FAIL client_generate_session_id client.c 4 - 18 -
Pass client_remote_id client.c 0 0
Pass client_io_reset client.c 0 0
FAIL client_create client.c 4 - 8 -
FAIL client_destroy client.c 1 - 1 -
Pass client_get_disconnect_reason client.c 0 0
FAIL client_disconnect client.c 1 - 3 -
Pass client_state_reset client.c 0 0
FAIL client_send_line client.c 1 - 7 -
FAIL clients_destroy client.c 3 - 17 -
FAIL cmd_lhlo commands.c 4 - 8 -
FAIL cmd_mail commands.c 1 - 4 -
FAIL client_proxy_rcpt_parse_fields commands.c 1 - 1 -
Pass client_proxy_is_ourself commands.c 0 0
FAIL address_add_detail commands.c 1 - 6 -
FAIL client_proxy_rcpt commands.c 4 - 7 -
FAIL lmtp_unescape_address commands.c 1 - 4 -
FAIL rcpt_address_parse commands.c 1 - 6 -
FAIL cmd_rcpt commands.c 1 - 15 -
Pass cmd_quit commands.c 0 0
Pass cmd_vrfy commands.c 0 0
Pass cmd_rset commands.c 0 0
Pass cmd_noop commands.c 0 0

Quality Result   Procedure   Source File   Unique Violations   Failure Density  
          (Viols/R.Line %)  
FAIL client_deliver commands.c 4 - 7 -
FAIL client_deliver_next commands.c 1 - 3 -
Pass client_rcpt_fail_all commands.c 0 0
FAIL client_get_input commands.c 1 - 9 -
FAIL client_open_raw_mail commands.c 4 - 14 -
FAIL client_input_data_write_local commands.c 3 - 2 -
Pass client_input_data_finish commands.c 0 0
FAIL client_proxy_finish commands.c 1 - 6 -
FAIL client_get_added_headers commands.c 1 - 5 -
FAIL client_input_data_write commands.c 1 - 10 -
FAIL client_input_add_file commands.c 1 - 2 -
Pass client_input_add commands.c 0 0
FAIL client_input_data_handle commands.c 4 - 10 -
Pass client_input_data commands.c 0 0
Pass cmd_data commands.c 0 0
FAIL lmtp_proxy_init lmtp-proxy.c 3 - 24 -
Pass lmtp_proxy_connections_deinit lmtp-proxy.c 0 0
Pass lmtp_proxy_deinit lmtp-proxy.c 0 0
Pass lmtp_proxy_mail_from lmtp-proxy.c 0 0
FAIL lmtp_proxy_get_connection lmtp-proxy.c 3 - 6 -
FAIL lmtp_proxy_send_data_replies lmtp-proxy.c 4 - 10 -
Pass lmtp_proxy_finish_timeout lmtp-proxy.c 0 0
Pass lmtp_proxy_finish lmtp-proxy.c 0 0
Pass lmtp_proxy_try_finish lmtp-proxy.c 0 0
Pass lmtp_conn_finish lmtp-proxy.c 0 0
FAIL lmtp_proxy_fail_all lmtp-proxy.c 4 - 13 -
FAIL lmtp_proxy_data_input_timeout lmtp-proxy.c 4 - 12 -
Pass lmtp_proxy_conn_rcpt_to lmtp-proxy.c 0 0
Pass lmtp_proxy_conn_data lmtp-proxy.c 0 0
FAIL lmtp_proxy_add_rcpt lmtp-proxy.c 1 - 8 -
Pass lmtp_proxy_find_lowest_offset lmtp-proxy.c 0 0
Pass lmtp_proxy_disc nnect_hanging_output lmtp-proxy.c 0 0
Pass lmtp_proxy_output_timeout lmtp-proxy.c 0 0
Pass lmtp_proxy_wait_for_output lmtp-proxy.c 0 0
FAIL lmtp_proxy_data_read lmtp-proxy.c 3 - 3 -
Pass lmtp_proxy_data_input lmtp-proxy.c 0 0
Pass lmtp_proxy_more_data_sent lmtp-proxy.c 0 0
Pass lmtp_proxy_start lmtp-proxy.c 0 0
FAIL lmtp_settings_dup lmtp-settings.c 1 - 140
FAIL client_connected main.c 1 - 25 -
FAIL drop_privileges main.c 3 - 91 -
Pass main_init main.c 0 0
Pass main_deinit main.c 0 0
FAIL main main.c 3 - 8 -


Global Information

Source Files in System

Name Last Modification Date
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lmtp\main.c Thu May 27 19:00:08 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lmtp\lmtp-settings.c Fri Jun 25 08:22:16 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lmtp\lmtp-proxy.c Mon Jun 07 19:00:04 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lmtp\commands.c Wed Jun 23 19:00:06 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lmtp\client.c Thu Jun 17 19:00:06 2010




Global Basic Information

Number of procedures: 92
Number of locally uncalled procedures: 0
Maximum loop depth: 2
Total Cyclomatic Complexity: 249
Number of reformatted executable lines: 2891
Number of lines of comments: 4661



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 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

Code File: Src Line Violation Standard
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
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 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

Code File: Src Line Violation Standard
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 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 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
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 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 mail-error.h: 19 Macro parameter not in brackets. CERT PRE01-C,PRE02-C
M mail-error.h: 19 Macro replacement list needs parentheses. CERT PRE02-C
M mail-storage.h: 414 Macro parameter not in brackets. CERT PRE01-C,PRE02-C
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 lmtp-settings.c: 22 Sizeof argument is a pointer. CERT EXP01-C
M lmtp-settings.c: 54 Macro parameter not in brackets. CERT PRE01-C,PRE02-C
M lmtp-settings.c: 54 Macro replacement list needs parentheses. CERT PRE02-C
M main.c: 28 Global not initialised at declaration. : dns_client_socket_path CERT EXP33-C
M main.c: 29 Global not initialised at declaration. : storage_service CERT EXP33-C
M ioloop.h: 38 Procedure contains UR data flow anomalies. : ioloop_time CERT EXP33-C
  113 (main.c)    
M hostpid.h: 5 Procedure contains UR data flow anomalies. : my_pid CERT EXP33-C
  127 (master-service.h)    

[ Top of Report | Procedure Table | Contents ]







array_create_i
(93 to 101 array.h analysed in 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 ]







client_input_line
(38 to 71 client.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 52 Pointer not checked for null before use : cmd CERT EXP08-C,EXP34-C
  50    
M 50 Pointer not checked for null before use : cmd CERT EXP08-C,EXP34-C
  47    


[ Top of Report | Procedure Table | Contents ]







client_input_read
(73 to 95 client.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 86 Pointer not checked for null before use : NULL CERT EXP08-C,EXP34-C


[ Top of Report | Procedure Table | Contents ]







client_input_handle
(97 to 115 client.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 104 Pointer not checked for null before use : output CERT EXP08-C,EXP34-C
  103    


[ Top of Report | Procedure Table | Contents ]







client_input
(117 to 122 client.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 121 Pointer not checked for null before use : client.proxy CERT EXP08-C,EXP34-C
  119    
M 121 Pointer not checked for null before use : client.disconnected CERT EXP08-C,EXP34-C
  119    


[ Top of Report | Procedure Table | Contents ]







client_raw_user_create
(124 to 147 client.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 133 Pointer not checked for null before use : sets CERT EXP08-C,EXP34-C
  131    
M 143 Pointer not checked for null before use : raw_ns CERT EXP08-C,EXP34-C
  142    
M 128 Procedure contains UR data flow anomalies. : error CERT EXP33-C
  136    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
client.c 128 client.c 136 error

[ Top of Report | Procedure Table | Contents ]







client_read_settings
(149 to 168 client.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 153 Procedure contains UR data flow anomalies. : error CERT EXP33-C
  160    
M 152 Procedure contains UR data flow anomalies. : set_parser CERT EXP33-C
  160    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
client.c 153 client.c 160 error
client.c 152 client.c 160 set_parser

[ Top of Report | Procedure Table | Contents ]







client_generate_session_id
(170 to 180 client.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 176 Pointer not checked for null before use : id CERT EXP08-C,EXP34-C
  173    
M 172 Procedure contains UR data flow anomalies. : guid CERT EXP33-C
  175    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
client.c 172 client.c 175 guid

[ Top of Report | Procedure Table | Contents ]







client_create
(204 to 242 client.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 241 Local structure returned in function result : client  
M 215 Pointer not checked for null before use : pool CERT EXP08-C,EXP34-C
  214    
M 216 Pointer not checked for null before use : client CERT EXP08-C,EXP34-C
  215    
M 207 Declaration types do not match across a system. : client CERT ARR31-C


[ Top of Report | Procedure Table | Contents ]







client_destroy
(244 to 271 client.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 250 Procedure contains UR data flow anomalies. : clients.prev CERT EXP33-C


[ Top of Report | Procedure Table | Contents ]







client_disconnect
(282 to 295 client.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 292 Pointer not checked for null before use : reason CERT EXP08-C,EXP34-C
  291    


[ Top of Report | Procedure Table | Contents ]







client_send_line
(329 to 343 client.c) - FAIL

Standards Violation Summary

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


[ Top of Report | Procedure Table | Contents ]







clients_destroy
(345 to 352 client.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 348 Pointer not checked for null before use : clients CERT EXP08-C,EXP34-C
  348    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
client.c 250 client.c 348 clients.prev

[ Top of Report | Procedure Table | Contents ]







cmd_lhlo
(38 to 76 commands.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 54 Pointer not checked for null before use : domain CERT EXP08-C,EXP34-C
  41    
M 40 Procedure contains UR data flow anomalies. : parser.data CERT EXP33-C
  51    
M 40 Procedure contains UR data flow anomalies. : parser.end CERT EXP33-C
  51    
M 40 Procedure contains UR data flow anomalies. : parser.last_comment CERT EXP33-C
  51    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
commands.c 40 commands.c 51 parser.data
commands.c 40 commands.c 51 parser.end
commands.c 40 commands.c 51 parser.last_comment

[ Top of Report | Procedure Table | Contents ]







cmd_mail
(78 to 113 commands.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 89 Pointer not checked for null before use : argv CERT EXP08-C,EXP34-C
  88    
M 90 Pointer not checked for null before use : addr CERT EXP08-C,EXP34-C
  89    
M 96 Pointer not checked for null before use : argv CERT EXP08-C,EXP34-C
  96    


[ Top of Report | Procedure Table | Contents ]







client_proxy_rcpt_parse_fields
(115 to 165 commands.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 132 Pointer not checked for null before use : key CERT EXP08-C,EXP34-C
  128    
M 135 Pointer not checked for null before use : value CERT EXP08-C,EXP34-C
  129    


[ Top of Report | Procedure Table | Contents ]







address_add_detail
(183 to 197 commands.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 195 Pointer not checked for null before use : username CERT EXP08-C,EXP34-C
  194    


[ Top of Report | Procedure Table | Contents ]







client_proxy_rcpt
(199 to 281 commands.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 211 Pointer not checked for null before use : input CERT EXP08-C,EXP34-C
  210    
M 223 Pointer not checked for null before use : auth_conn CERT EXP08-C,EXP34-C
  222    
M 223 Pointer not checked for null before use : info.service CERT EXP08-C,EXP34-C
  215    
M 223 Pointer not checked for null before use : pool CERT EXP08-C,EXP34-C
  221    
M 222 Pointer not checked for null before use : storage_service CERT EXP08-C,EXP34-C
  Ref. Line -5736 (Module 756)    
M 275 Pointer not checked for null before use : address CERT EXP08-C,EXP34-C
  253    
M 248 Pointer not checked for null before use : username CERT EXP08-C,EXP34-C
  243    
M 254 Pointer not checked for null before use : set.host CERT EXP08-C,EXP34-C
  243    
M 206 Procedure contains UR data flow anomalies. : fields CERT EXP33-C
  223    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
commands.c 206 commands.c 223 fields

[ Top of Report | Procedure Table | Contents ]







lmtp_unescape_address
(283 to 314 commands.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 312 Pointer not checked for null before use : str CERT EXP08-C,EXP34-C
  293    
M 306 Pointer not checked for null before use : str CERT EXP08-C,EXP34-C
  293    
M 306 Pointer not checked for null before use : p CERT EXP08-C,EXP34-C
  302    


[ Top of Report | Procedure Table | Contents ]







rcpt_address_parse
(316 to 339 commands.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 336 Pointer not checked for null before use : username_r CERT EXP08-C,EXP34-C
  330    
M 330 Pointer not checked for null before use : username_r CERT EXP08-C,EXP34-C
  321    


[ Top of Report | Procedure Table | Contents ]







cmd_rcpt
(341 to 406 commands.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 356 Pointer not checked for null before use : argv CERT EXP08-C,EXP34-C
  355    
M 367 Pointer not checked for null before use : argv CERT EXP08-C,EXP34-C
  362    
M 384 Pointer not checked for null before use : input.userdb_fields CERT EXP08-C,EXP34-C
  378    
M 384 Pointer not checked for null before use : input.username CERT EXP08-C,EXP34-C
  380    
M 384 Pointer not checked for null before use : input.module CERT EXP08-C,EXP34-C
  379    
M 402 Pointer not checked for null before use : rcpt.detail CERT EXP08-C,EXP34-C
  401    
M 402 Pointer not checked for null before use : rcpt.address CERT EXP08-C,EXP34-C
  400    
M 384 Pointer not checked for null before use : rcpt.service_user CERT EXP08-C,EXP34-C
  364    
M 371 Pointer not checked for null before use : address CERT EXP08-C,EXP34-C
  365    
M 400 Pointer not checked for null before use : address CERT EXP08-C,EXP34-C
  374    
M 374 Pointer not checked for null before use : username CERT EXP08-C,EXP34-C
  371    
M 380 Pointer not checked for null before use : username CERT EXP08-C,EXP34-C
  371    
M 401 Pointer not checked for null before use : detail CERT EXP08-C,EXP34-C
  371    
M 357 Pointer not checked for null before use : arg CERT EXP08-C,EXP34-C
  356    


[ Top of Report | Procedure Table | Contents ]







client_deliver
(433 to 499 commands.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 446 Pointer not checked for null before use : input CERT EXP08-C,EXP34-C
  445    
M 448 Pointer not checked for null before use : username CERT EXP08-C,EXP34-C
  446    
M 460 Pointer not checked for null before use : sets CERT EXP08-C,EXP34-C
  456    
M 448 Pointer not checked for null before use : my_pid CERT EXP08-C,EXP34-C
  Ref. Line -2819 (Module 756)    
M 442 Procedure contains UR data flow anomalies. : mail_error CERT EXP33-C
  486    
M 438 Procedure contains UR data flow anomalies. : storage CERT EXP33-C
  470    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
commands.c 442 commands.c 486 mail_error
commands.c 438 commands.c 470 storage

[ Top of Report | Procedure Table | Contents ]







client_deliver_next
(501 to 521 commands.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 509 Pointer not checked for null before use : rcpts CERT EXP08-C,EXP34-C
  507    


[ Top of Report | Procedure Table | Contents ]







client_get_input
(533 to 558 commands.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 546 Pointer not checked for null before use : inputs CERT EXP08-C,EXP34-C
  543    
M 554 Pointer not checked for null before use : inputs CERT EXP08-C,EXP34-C
  552    


[ Top of Report | Procedure Table | Contents ]







client_open_raw_mail
(560 to 594 commands.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 584 Pointer not checked for null before use : raw_box CERT EXP08-C,EXP34-C
  583    
M 589 Pointer not checked for null before use : headers_ctx CERT EXP08-C,EXP34-C
  588    
M 569 Procedure contains UR data flow anomalies. : error CERT EXP33-C
  578    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
commands.c 569 commands.c 578 error

[ Top of Report | Procedure Table | Contents ]







client_input_data_write_local
(596 to 649 commands.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 614 Procedure contains UR data flow anomalies. : (client)->state.dest_user CERT EXP33-C


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
commands.c 614 commands.c 607 (client)->state.dest_user

[ Top of Report | Procedure Table | Contents ]







client_proxy_finish
(659 to 671 commands.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 661 Declaration types do not match across a system. : client CERT ARR31-C


[ Top of Report | Procedure Table | Contents ]







client_get_added_headers
(673 to 700 commands.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 682 Pointer not checked for null before use : rcpt CERT EXP08-C,EXP34-C
  679    
M 685 Pointer not checked for null before use : str CERT EXP08-C,EXP34-C
  675    


[ Top of Report | Procedure Table | Contents ]







client_input_data_write
(702 to 718 commands.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 710 Pointer not checked for null before use : input CERT EXP08-C,EXP34-C
  709    
M 712 Pointer not checked for null before use : NULL CERT EXP08-C,EXP34-C


[ Top of Report | Procedure Table | Contents ]







client_input_add_file
(720 to 764 commands.c) - FAIL

Standards Violation Summary

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


[ Top of Report | Procedure Table | Contents ]







client_input_data_handle
(779 to 799 commands.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 787 Pointer not checked for null before use : data CERT EXP08-C,EXP34-C
  786    
M 797 Pointer not checked for null before use : client.mail_data_fd CERT EXP08-C,EXP34-C
  787    
M 782 Procedure contains UR data flow anomalies. : size CERT EXP33-C
  786    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
commands.c 782 commands.c 786 size

[ Top of Report | Procedure Table | Contents ]







lmtp_proxy_init
(63 to 81 lmtp-proxy.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 80 Local structure returned in function result : proxy  
M 73 Pointer not checked for null before use : pool CERT EXP08-C,EXP34-C
  72    
M 74 Pointer not checked for null before use : proxy CERT EXP08-C,EXP34-C
  73    
M 78 Pointer not checked for null before use : default_pool CERT EXP08-C,EXP34-C
  Ref. Line -1101 (Module 757)    


[ Top of Report | Procedure Table | Contents ]







lmtp_proxy_get_connection
(123 to 160 lmtp-proxy.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 137 Local structure returned in function result : conn  
M 159 Local structure returned in function result : conn  
M 135 Pointer not checked for null before use : conn CERT EXP08-C,EXP34-C
  133    
M 146 Pointer not checked for null before use : conn CERT EXP08-C,EXP34-C
  145    


[ Top of Report | Procedure Table | Contents ]







lmtp_proxy_send_data_replies
(162 to 179 lmtp-proxy.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 170 Pointer not checked for null before use : rcpt CERT EXP08-C,EXP34-C
  168    
M 165 Procedure contains UR data flow anomalies. : count CERT EXP33-C
  169    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
lmtp-proxy.c 165 lmtp-proxy.c 169 count

[ Top of Report | Procedure Table | Contents ]







lmtp_proxy_fail_all
(223 to 245 lmtp-proxy.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 234 Pointer not checked for null before use : line CERT EXP08-C,EXP34-C
  231    
M 233 Pointer not checked for null before use : conns CERT EXP08-C,EXP34-C
  229    
M 226 Procedure contains UR data flow anomalies. : count CERT EXP33-C
  230    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
lmtp-proxy.c 226 lmtp-proxy.c 230 count

[ Top of Report | Procedure Table | Contents ]







lmtp_proxy_data_input_timeout
(247 to 266 lmtp-proxy.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 257 Pointer not checked for null before use : conns CERT EXP08-C,EXP34-C
  255    
M 250 Procedure contains UR data flow anomalies. : count CERT EXP33-C
  256    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
lmtp-proxy.c 250 lmtp-proxy.c 256 count

[ Top of Report | Procedure Table | Contents ]







lmtp_proxy_add_rcpt
(295 to 313 lmtp-proxy.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 302 Pointer not checked for null before use : conn CERT EXP08-C,EXP34-C
  301    
M 306 Pointer not checked for null before use : rcpt CERT EXP08-C,EXP34-C
  305    


[ Top of Report | Procedure Table | Contents ]







lmtp_proxy_data_read
(381 to 422 lmtp-proxy.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 383 Procedure contains UR data flow anomalies. : size CERT EXP33-C
  418    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
lmtp-proxy.c 383 lmtp-proxy.c 418 size

[ Top of Report | Procedure Table | Contents ]







lmtp_settings_dup
(85 to 94 lmtp-settings.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 92 Pointer not checked for null before use : sets CERT EXP08-C,EXP34-C
  91    
M 93 Pointer not checked for null before use : lmtp_setting_parser_info.dynamic_parsers CERT EXP08-C,EXP34-C
  11 (lmtp-settings.h)    
M 93 Pointer not checked for null before use : lmtp_setting_parser_info.dependencies CERT EXP08-C,EXP34-C
  11 (lmtp-settings.h)    
M 93 Pointer not checked for null before use : lmtp_setting_parser_info.parent CERT EXP08-C,EXP34-C
  11 (lmtp-settings.h)    
M 93 Pointer not checked for null before use : lmtp_setting_parser_info.defaults CERT EXP08-C,EXP34-C
  11 (lmtp-settings.h)    
M 93 Pointer not checked for null before use : lmtp_setting_parser_info.defines CERT EXP08-C,EXP34-C
  11 (lmtp-settings.h)    
M 93 Pointer not checked for null before use : lmtp_setting_parser_info.module_name CERT EXP08-C,EXP34-C
  11 (lmtp-settings.h)    


[ Top of Report | Procedure Table | Contents ]







client_connected
(31 to 35 main.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
C 31 Procedure not called in code analysed : client_connected  


[ Top of Report | Procedure Table | Contents ]







drop_privileges
(37 to 50 main.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 40 Procedure contains UR data flow anomalies. : error CERT EXP33-C
  46    
M 39 Procedure contains UR data flow anomalies. : set.chroot_dir CERT EXP33-C
  43    
M 39 Procedure contains UR data flow anomalies. : set.extra_groups CERT EXP33-C
  43    
M 39 Procedure contains UR data flow anomalies. : set.first_valid_gid CERT EXP33-C
  43    
M 39 Procedure contains UR data flow anomalies. : set.gid CERT EXP33-C
  43    
M 39 Procedure contains UR data flow anomalies. : set.last_valid_gid CERT EXP33-C
  43    
M 39 Procedure contains UR data flow anomalies. : set.privileged_gid CERT EXP33-C
  43    
M 39 Procedure contains UR data flow anomalies. : set.system_groups_user CERT EXP33-C
  43    
M 39 Procedure contains UR data flow anomalies. : set.uid CERT EXP33-C
  43    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
main.c 40 main.c 46 error
main.c 39 main.c 43 set.chroot_dir
main.c 39 main.c 43 set.extra_groups
main.c 39 main.c 43 set.first_valid_gid
main.c 39 main.c 43 set.gid
main.c 39 main.c 43 set.last_valid_gid
main.c 39 main.c 43 set.privileged_gid
main.c 39 main.c 43 set.system_groups_user
main.c 39 main.c 43 set.uid

[ Top of Report | Procedure Table | Contents ]







main
(68 to 120 main.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 113 Pointer not checked for null before use : storage_service CERT EXP08-C,EXP34-C
  109    
M 117 Pointer not checked for null before use : storage_service CERT EXP08-C,EXP34-C
  109    
M 113 Pointer not checked for null before use : lmtp_setting_parser_info.module_name CERT EXP08-C,EXP34-C
  Ref. Line 1 (main.c)    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
ioloop.h 38 main.c 113 ioloop_time
hostpid.h 5 main.c 107 my_pid

[ Top of Report | Procedure Table | Contents ]



End of Code Review Report

Copyright © 2010 Liverpool Data Research Associates