LDRA Testbed ® Code Review Report

System : Dovecot-src-anvil






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 16:38:55
  • 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
75 77 S Macro replacement list needs parentheses. CERT PRE02-C
48 78 S Macro parameter not in brackets. CERT PRE01-C,PRE02-C
3 480 S String function params access same variable. CERT DCL33-C
2 483 S free parameter is not heap item. CERT MEM34-C
3 577 S Sizeof argument is a pointer. CERT EXP01-C
10 5 D Procedure contains UR data flow anomalies. CERT EXP33-C
31 45 D Pointer not checked for null before use CERT EXP08-C,EXP34-C
1 50 D Memory not freed after last reference. CERT MEM00-C
6 51 D Attempt to read from freed memory. CERT MEM30-C
3 57 D Global not initialised at declaration. CERT EXP33-C
19 69 D Procedure contains UR data flow anomalies. CERT EXP33-C
3 77 D Local structure returned in function result  


Number of Violations LDRA Code (C) Checking (Mandatory) Standards CERT Code
3 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 51 program components, 26 (50.98 %) pass ( of which 0 conditionally pass ) and 25 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 anvil_connection_next_line anvil-connection.c 0 0
FAIL anvil_connection_request anvil-connection.c 5 - 2 -
FAIL anvil_connection_input anvil-connection.c 5 - 5 -
FAIL anvil_connection_create anvil-connection.c 4 - 10 -
FAIL anvil_connection_destroy anvil-connection.c 2 - 2 -
FAIL anvil_connections_destroy_all anvil-connection.c 5 - 27 -
Pass buffer_get_data buffer.h analysed in anvil-settings.c 0 0
Pass buffer_get_used_size buffer.h analysed in anvil-settings.c 0 0
Pass ident_pid_hash connect-limit.c 0 0
Pass ident_pid_cmp connect-limit.c 0 0
FAIL connect_limit_init connect-limit.c 4 - 33 -
FAIL connect_limit_deinit connect-limit.c 2 - 11 -
Pass connect_limit_lookup connect-limit.c 0 0
FAIL connect_limit_connect connect-limit.c 5 - 21 -
FAIL connect_limit_ident_hash_unref connect-limit.c 7 - 13 -
FAIL connect_limit_disconnect connect-limit.c 7 - 17 -
FAIL connect_limit_disconnect_pid connect-limit.c 5 - 9 -
FAIL connect_limit_dump connect-limit.c 5 - 13 -
Pass array_create_from_buffer_i array.h analysed in main.c 0 0
FAIL array_create_i array.h analysed in main.c 2 - 17 -
Pass array_free_i array.h analysed in main.c 0 0
Pass array_is_created_i array.h analysed in main.c 0 0
Pass array_get_pool_i array.h analysed in main.c 0 0
Pass array_clear_i array.h analysed in main.c 0 0
Pass array_append_i array.h analysed in main.c 0 0
Pass array_append_array_i array.h analysed in main.c 0 0
Pass array_insert_i array.h analysed in main.c 0 0
Pass array_delete_i array.h analysed in main.c 0 0
Pass array_get_i array.h analysed in main.c 0 0
Pass array_idx_i array.h analysed in main.c 0 0
Pass array_get_modifiable_i array.h analysed in main.c 0 0
Pass array_append_space_i array.h analysed in main.c 0 0
Pass array_copy array.h analysed in main.c 0 0
Pass array_count_i array.h analysed in main.c 0 0
FAIL client_connected main.c 2 - 25 -
FAIL log_fdpass_input main.c 5 - 11 -
FAIL main main.c 7 - 31 -
FAIL penalty_init penalty.c 4 - 43 -
FAIL penalty_rec_free penalty.c 5 - 13 -
Pass penalty_deinit penalty.c 0 0
Pass penalty_set_expire_secs penalty.c 0 0
FAIL penalty_bump_checksum penalty.c 2 - 2 -
FAIL penalty_add_checksum penalty.c 5 - 14 -
Pass penalty_get penalty.c 0 0
FAIL penalty_timeout penalty.c 4 - 8 -
FAIL penalty_inc penalty.c 2 - 1 -
Pass penalty_has_checksum penalty.c 0 0
FAIL penalty_dump penalty.c 2 - 4 -

Quality Result   Procedure   Source File   Unique Violations   Failure Density  
          (Viols/R.Line %)  
FAIL test_penalty_checksum test-penalty.c 2 - 1 -
Pass main test-penalty.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\anvil\test-penalty.c Fri Mar 26 07:16:36 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\anvil\penalty.c Fri Mar 26 07:16:36 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\anvil\main.c Thu May 27 19:00:08 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\anvil\connect-limit.c Fri Mar 26 07:16:36 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\anvil\anvil-settings.c Fri Jun 25 08:22:16 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\anvil\anvil-connection.c Wed Jun 02 19:00:04 2010




Global Basic Information

Number of procedures: 50
Number of locally uncalled procedures: 0
Maximum loop depth: 2
Total Cyclomatic Complexity: 125
Number of reformatted executable lines: 1377
Number of lines of comments: 4018



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 llist.h: 5 Macro replacement list needs parentheses. CERT PRE02-C
M llist.h: 12 Macro replacement list needs parentheses. CERT PRE02-C

Code File: Src Line Violation Standard
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 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 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 anvil-settings.c: 19 Sizeof argument is a pointer. CERT EXP01-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

Code File: Src Line Violation Standard
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 main.c: 17 Global not initialised at declaration. : connect_limit CERT EXP33-C
M main.c: 18 Global not initialised at declaration. : penalty CERT EXP33-C
M main.c: 19 Global not initialised at declaration. : log_fdpass_io CERT EXP33-C
M test-common.h: 11 Macro parameter not in brackets. CERT PRE01-C,PRE02-C
M test-common.h: 11 Macro replacement list needs parentheses. CERT PRE02-C

[ Top of Report | Procedure Table | Contents ]







anvil_connection_request
(45 to 129 anvil-connection.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 55 Pointer not checked for null before use : cmd CERT EXP08-C,EXP34-C
  49    
M 50 Procedure contains UR data flow anomalies. : checksum CERT EXP33-C
  107    
M 50 Procedure contains UR data flow anomalies. : value CERT EXP33-C
  116    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
anvil-connection.c 50 anvil-connection.c 107 checksum
anvil-connection.c 50 anvil-connection.c 116 value

[ Top of Report | Procedure Table | Contents ]







anvil_connection_input
(131 to 169 anvil-connection.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 163 Pointer not checked for null before use : error CERT EXP08-C,EXP34-C
  162    
M 164 Pointer not checked for null before use : default_pool CERT EXP08-C,EXP34-C
  162    
M 134 Procedure contains UR data flow anomalies. : error CERT EXP33-C
  163    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
anvil-connection.c 134 anvil-connection.c 163 error

[ Top of Report | Procedure Table | Contents ]







anvil_connection_create
(171 to 185 anvil-connection.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 184 Local structure returned in function result : conn  
M 177 Pointer not checked for null before use : conn CERT EXP08-C,EXP34-C
  176    
M 176 Pointer not checked for null before use : default_pool CERT EXP08-C,EXP34-C
  Ref. Line -1101 (Module 185)    


[ Top of Report | Procedure Table | Contents ]







anvil_connection_destroy
(187 to 200 anvil-connection.c) - FAIL

Standards Violation Summary

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


[ Top of Report | Procedure Table | Contents ]







anvil_connections_destroy_all
(202 to 206 anvil-connection.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 205 Pointer not checked for null before use : anvil_connections CERT EXP08-C,EXP34-C
  205    
M 205 Attempt to read from freed memory. : anvil_connections CERT MEM30-C


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
anvil-connection.c 189 anvil-connection.c 205 anvil_connections.prev

[ Top of Report | Procedure Table | Contents ]







connect_limit_init
(43 to 55 connect-limit.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 54 Local structure returned in function result : limit  
M 48 Pointer not checked for null before use : limit CERT EXP08-C,EXP34-C
  47    
M 51 Pointer not checked for null before use : default_pool CERT EXP08-C,EXP34-C
  Ref. Line -1101 (Module 187)    


[ Top of Report | Procedure Table | Contents ]







connect_limit_deinit
(57 to 65 connect-limit.c) - FAIL

Standards Violation Summary

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


[ Top of Report | Procedure Table | Contents ]







connect_limit_connect
(79 to 106 connect-limit.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 88 Pointer not checked for null before use : key CERT EXP08-C,EXP34-C
  86    
M 88 Pointer not checked for null before use : value CERT EXP08-C,EXP34-C
  87    
M 91 Pointer not checked for null before use : value CERT EXP08-C,EXP34-C
  90    
M 96 Pointer not checked for null before use : lookup_i.ident CERT EXP08-C,EXP34-C
  94    
M 99 Pointer not checked for null before use : i CERT EXP08-C,EXP34-C
  98    
M 83 Procedure contains UR data flow anomalies. : key CERT EXP33-C
  85    
M 82 Procedure contains UR data flow anomalies. : lookup_i.refcount CERT EXP33-C
  96    
M 83 Procedure contains UR data flow anomalies. : value CERT EXP33-C
  85    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
connect-limit.c 83 connect-limit.c 85 key
connect-limit.c 82 connect-limit.c 96 lookup_i.refcount
connect-limit.c 83 connect-limit.c 85 value

[ Top of Report | Procedure Table | Contents ]







connect_limit_ident_hash_unref
(108 to 125 connect-limit.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 123 free parameter is not heap item. CERT MEM34-C
M 120 Pointer not checked for null before use : value CERT EXP08-C,EXP34-C
  119    
M 111 Procedure contains UR data flow anomalies. : value CERT EXP33-C
  114    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
connect-limit.c 111 connect-limit.c 114 value

[ Top of Report | Procedure Table | Contents ]







connect_limit_disconnect
(127 to 148 connect-limit.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 135 Pointer not checked for null before use : lookup_i.ident CERT EXP08-C,EXP34-C
  132    
M 148 Memory not freed after last reference. : i CERT MEM00-C
M 147 Pointer not checked for null before use : default_pool CERT EXP08-C,EXP34-C
  144    
M 130 Procedure contains UR data flow anomalies. : lookup_i.refcount CERT EXP33-C
  135    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
connect-limit.c 130 connect-limit.c 135 lookup_i.refcount

[ Top of Report | Procedure Table | Contents ]







connect_limit_disconnect_pid
(150 to 169 connect-limit.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 164 Pointer not checked for null before use : default_pool CERT EXP08-C,EXP34-C
  165    
M 154 Procedure contains UR data flow anomalies. : value CERT EXP33-C
  159    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
connect-limit.c 154 connect-limit.c 159 value

[ Top of Report | Procedure Table | Contents ]







connect_limit_dump
(171 to 189 connect-limit.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 181 Pointer not checked for null before use : str CERT EXP08-C,EXP34-C
  175    
M 174 Procedure contains UR data flow anomalies. : value CERT EXP33-C
  178    


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
connect-limit.c 174 connect-limit.c 178 value

[ Top of Report | Procedure Table | Contents ]







array_create_i
(93 to 101 array.h analysed in main.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_connected
(21 to 27 main.c) - FAIL

Standards Violation Summary

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


[ Top of Report | Procedure Table | Contents ]







log_fdpass_input
(29 to 48 main.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 32 Procedure contains UR data flow anomalies. : c CERT EXP33-C
  36    
M 31 Procedure contains UR data flow anomalies. : fd CERT EXP33-C
  36    
C 29 Procedure not called in code analysed : log_fdpass_input  


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
main.c 32 main.c 36 c
main.c 31 main.c 36 fd

[ Top of Report | Procedure Table | Contents ]







main
(50 to 75 main.c) - FAIL

Standards Violation Summary

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

Code Line Violation Standard
M 71 Pointer not checked for null before use : default_pool CERT EXP08-C,EXP34-C
  70    
M 72 Pointer not checked for null before use : default_pool CERT EXP08-C,EXP34-C
  71    
M 62 Attempt to read from freed memory. : default_pool CERT MEM30-C
M 72 Attempt to read from freed memory. : anvil_connections CERT MEM30-C
M 61 Procedure contains UR data flow anomalies. : (default_pool)->v CERT EXP33-C
M 72 Procedure contains UR data flow anomalies. : anvil_connections.fd CERT EXP33-C
M 72 Procedure contains UR data flow anomalies. : anvil_connections.input CERT EXP33-C
M 72 Procedure contains UR data flow anomalies. : anvil_connections.io CERT EXP33-C
M 72 Procedure contains UR data flow anomalies. : anvil_connections.next CERT EXP33-C
M 72 Procedure contains UR data flow anomalies. : anvil_connections.output CERT EXP33-C


Possible UR Anomalies

The following variables may be referenced before being given a value

File Undefine File Reference Variable
[external declaration]   main.c 61 (default_pool)->v
[external declaration]   main.c 72 anvil_connections.fd
[external declaration]   main.c 72 anvil_connections.input
[external declaration]   main.c 72 anvil_connections.io
[external declaration]   main.c 72 anvil_connections.next
[external declaration]   main.c 72 anvil_connections.output

[ Top of Report | Procedure Table | Contents ]







penalty_init
(48 to 58 penalty.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 57 Local structure returned in function result : penalty  
M 53 Pointer not checked for null before use : penalty CERT EXP08-C,EXP34-C
  52    
M 53 Pointer not checked for null before use : default_pool CERT EXP08-C,EXP34-C
  Ref. Line -1101 (Module 189)    


[ Top of Report | Procedure Table | Contents ]







penalty_rec_free
(60 to 67 penalty.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 64 free parameter is not heap item. CERT MEM34-C
M 66 Pointer not checked for null before use : default_pool CERT EXP08-C,EXP34-C
  65    
M 66 Attempt to read from freed memory. : default_pool CERT MEM30-C
M 66 Pointer not checked for null before use : (rec)->ident CERT EXP08-C,EXP34-C
  65    
M 65 Pointer not checked for null before use : default_pool CERT EXP08-C,EXP34-C
  64    
M 65 Attempt to read from freed memory. : default_pool CERT MEM30-C


[ Top of Report | Procedure Table | Contents ]







penalty_bump_checksum
(89 to 114 penalty.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 106 String function params access same variable. CERT DCL33-C


[ Top of Report | Procedure Table | Contents ]







penalty_add_checksum
(116 to 143 penalty.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 124 String function params access same variable. CERT DCL33-C
M 124 Sizeof argument is a pointer. CERT EXP01-C
M 139 String function params access same variable. CERT DCL33-C
M 139 Sizeof argument is a pointer. CERT EXP01-C
M 135 Pointer not checked for null before use : checksums CERT EXP08-C,EXP34-C
  133    


[ Top of Report | Procedure Table | Contents ]







penalty_timeout
(160 to 182 penalty.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 172 Pointer not checked for null before use : rec CERT EXP08-C,EXP34-C
  170    
M 180 Attempt to read from freed memory. : rec CERT MEM30-C


[ Top of Report | Procedure Table | Contents ]







penalty_inc
(184 to 229 penalty.c) - FAIL

Standards Violation Summary

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


[ Top of Report | Procedure Table | Contents ]







penalty_dump
(257 to 272 penalty.c) - FAIL

Standards Violation Summary

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


[ Top of Report | Procedure Table | Contents ]







test_penalty_checksum
(8 to 55 test-penalty.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
C 8 Procedure not called in code analysed : test_penalty_checksum  


[ Top of Report | Procedure Table | Contents ]



End of Code Review Report

Copyright © 2010 Liverpool Data Research Associates