LDRA Testbed Code Review Report

LDRA Testbed ® Code Review Report

# System : Dovecot-src-lib-otp

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 19:35:58 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
--- | --- | --- | ---
36 | 77 S | Macro replacement list needs parentheses. | CERT PRE02-C
16 | 78 S | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
10 | 5 D | Procedure contains UR data flow anomalies. | CERT EXP33-C
16 | 45 D | Pointer not checked for null before use | CERT EXP08-C,EXP34-C
59 | 69 D | Procedure contains UR data flow anomalies. | CERT EXP33-C
1 | 1 X | Declaration types do not match across a system. | CERT ARR31-C

Number of Violations | LDRA Code | (C) Checking (Mandatory) Standards | CERT Code
--- | --- | --- | ---
4 | 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 26 program components, 13 (50.00 %) pass ( of which 0 conditionally pass ) and 13 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 |  | otp_parity |  | otp-parity.h analysed in otp-dictionary.c |  | 0 |  | 0 |
Pass |  | otp_lookup_word |  | otp-dictionary.c |  | 0 |  | 0 |
FAIL |  | md4_fold |  | otp-hash.c |  | 7 | - |  | 40 | - |
FAIL |  | md5_fold |  | otp-hash.c |  | 7 | - |  | 40 | - |
Pass |  | swab_uint32 |  | otp-hash.c |  | 0 |  | 0 |
FAIL |  | sha1_fold |  | otp-hash.c |  | 7 | - |  | 22 | - |
Pass |  | digest_name |  | otp-hash.c |  | 0 |  | 0 |
Pass |  | digest_find |  | otp-hash.c |  | 0 |  | 0 |
Pass |  | digest_init |  | otp-hash.c |  | 0 |  | 0 |
Pass |  | digest_update |  | otp-hash.c |  | 0 |  | 0 |
Pass |  | digest_final |  | otp-hash.c |  | 0 |  | 0 |
Pass |  | digest_otp_final |  | otp-hash.c |  | 0 |  | 0 |
FAIL |  | otp_hash |  | otp-hash.c |  | 7 | - |  | 77 | - |
FAIL |  | otp_next_hash |  | otp-hash.c |  | 7 | - |  | 218 |
Pass |  | buffer_get_data |  | buffer.h analysed in otp-parse.c |  | 0 |  | 0 |
Pass |  | buffer_get_used_size |  | buffer.h analysed in otp-parse.c |  | 0 |  | 0 |
Pass |  | otp_skip_lws |  | otp-parse.c |  | 0 |  | 0 |
Pass |  | otp_check_tail |  | otp-parse.c |  | 0 |  | 0 |
FAIL |  | otp_read_hex |  | otp-parse.c |  | 10 | - |  | 8 | - |
FAIL |  | otp_read_words |  | otp-parse.c |  | 10 | - |  | 4 | - |
FAIL |  | otp_read_new_params |  | otp-parse.c |  | 3 | - |  | 9 | - |
FAIL |  | otp_parse_response |  | otp-parse.c |  | 13 | - |  | 17 | - |
FAIL |  | otp_parse_init_response |  | otp-parse.c |  | 13 | - |  | 7 | - |
FAIL |  | otp_parse_dbentry |  | otp-parse.c |  | 13 | - |  | 20 | - |
FAIL |  | otp_print_dbentry |  | otp-parse.c |  | 3 | - |  | 14 | - |

#### 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-otp\otp-parse.c | Fri Mar 26 20:00:04 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lib-otp\otp-parity.c | Fri Mar 26 07:16:36 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lib-otp\otp-hash.c | Fri Mar 26 07:16:36 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lib-otp\otp-dictionary.c | Fri Mar 26 07:16:36 2010

#### Global Basic Information

Number of procedures: | 25
Number of locally uncalled procedures: | 0
Maximum loop depth: | 2
Total Cyclomatic Complexity: | 70
Number of reformatted executable lines: | 730
Number of lines of comments: | 2258

## 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 | sha1.h: 71 | Macro replacement list needs parentheses. | CERT PRE02-C
M | sha1.h: 72 | Macro replacement list needs parentheses. | CERT PRE02-C

Code | File: Src Line | Violation | Standard
--- | --- | --- | ---
M | sha1.h: 73 | Macro replacement list needs parentheses. | CERT PRE02-C
M | otp-parity.c: 12 | Declaration types do not match across a system. : parity_table | CERT ARR31-C
| 4 (otp-parity.h) |  |
M | otp-parse.c: 74 | Macro replacement list needs parentheses. | CERT PRE02-C

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

md4_fold (33 to 41 otp-hash.c) - FAIL

#### Standards Violation Summary

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

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 35 | Procedure contains UR data flow anomalies. : tmp | CERT EXP33-C
| 37 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
otp-hash.c | 35 | otp-hash.c | 37 | tmp

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

md5_fold (43 to 51 otp-hash.c) - FAIL

#### Standards Violation Summary

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

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 45 | Procedure contains UR data flow anomalies. : tmp | CERT EXP33-C
| 47 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
otp-hash.c | 45 | otp-hash.c | 47 | tmp

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

sha1_fold (71 to 79 otp-hash.c) - FAIL

#### Standards Violation Summary

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

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 73 | Procedure contains UR data flow anomalies. : tmp | CERT EXP33-C
| 75 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
otp-hash.c | 73 | otp-hash.c | 75 | tmp

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

otp_hash (136 to 151 otp-hash.c) - FAIL

#### Standards Violation Summary

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

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.md4_ctx.a | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.md4_ctx.b | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.md4_ctx.block | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.md4_ctx.buffer | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.md4_ctx.c | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.md4_ctx.d | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.md4_ctx.hi | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.md4_ctx.lo | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.md5_ctx.a | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.md5_ctx.b | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.md5_ctx.block | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.md5_ctx.buffer | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.md5_ctx.c | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.md5_ctx.d | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.md5_ctx.hi | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.md5_ctx.lo | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.sha1_ctx.c.b64 | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.sha1_ctx.c.b8 | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.sha1_ctx.count | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.sha1_ctx.h.b32 | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.sha1_ctx.h.b8 | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.sha1_ctx.m.b32 | CERT EXP33-C
| 141 |  |
M | 139 | Procedure contains UR data flow anomalies. : ctx.ctx.sha1_ctx.m.b8 | CERT EXP33-C
| 141 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.md4_ctx.a
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.md4_ctx.b
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.md4_ctx.block
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.md4_ctx.buffer
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.md4_ctx.c
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.md4_ctx.d
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.md4_ctx.hi
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.md4_ctx.lo
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.md5_ctx.a
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.md5_ctx.b
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.md5_ctx.block
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.md5_ctx.buffer
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.md5_ctx.c
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.md5_ctx.d
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.md5_ctx.hi
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.md5_ctx.lo
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.sha1_ctx.c.b64
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.sha1_ctx.c.b8
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.sha1_ctx.count
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.sha1_ctx.h.b32
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.sha1_ctx.h.b8
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.sha1_ctx.m.b32
otp-hash.c | 139 | otp-hash.c | 141 | ctx.ctx.sha1_ctx.m.b8

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

otp_next_hash (153 to 161 otp-hash.c) - FAIL

#### Standards Violation Summary

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

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.md4_ctx.a | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.md4_ctx.b | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.md4_ctx.block | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.md4_ctx.buffer | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.md4_ctx.c | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.md4_ctx.d | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.md4_ctx.hi | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.md4_ctx.lo | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.md5_ctx.a | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.md5_ctx.b | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.md5_ctx.block | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.md5_ctx.buffer | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.md5_ctx.c | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.md5_ctx.d | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.md5_ctx.hi | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.md5_ctx.lo | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.sha1_ctx.c.b64 | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.sha1_ctx.c.b8 | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.sha1_ctx.count | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.sha1_ctx.h.b32 | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.sha1_ctx.h.b8 | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.sha1_ctx.m.b32 | CERT EXP33-C
| 158 |  |
M | 156 | Procedure contains UR data flow anomalies. : ctx.ctx.sha1_ctx.m.b8 | CERT EXP33-C
| 158 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.md4_ctx.a
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.md4_ctx.b
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.md4_ctx.block
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.md4_ctx.buffer
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.md4_ctx.c
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.md4_ctx.d
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.md4_ctx.hi
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.md4_ctx.lo
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.md5_ctx.a
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.md5_ctx.b
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.md5_ctx.block
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.md5_ctx.buffer
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.md5_ctx.c
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.md5_ctx.d
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.md5_ctx.hi
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.md5_ctx.lo
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.sha1_ctx.c.b64
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.sha1_ctx.c.b8
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.sha1_ctx.count
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.sha1_ctx.h.b32
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.sha1_ctx.h.b8
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.sha1_ctx.m.b32
otp-hash.c | 156 | otp-hash.c | 158 | ctx.ctx.sha1_ctx.m.b8

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

otp_read_hex (36 to 72 otp-parse.c) - FAIL

#### Standards Violation Summary

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

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 66 | Pointer not checked for null before use : data | CERT EXP08-C,EXP34-C
| 54 |  |
M | 52 | Pointer not checked for null before use : str | CERT EXP08-C,EXP34-C
| 45 |  |
M | 39 | Procedure contains UR data flow anomalies. : buf.data | CERT EXP33-C
| 46 |  |
M | 39 | Procedure contains UR data flow anomalies. : buf.priv | CERT EXP33-C
| 46 |  |
M | 39 | Procedure contains UR data flow anomalies. : buf.used | CERT EXP33-C
| 46 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
otp-parse.c | 39 | otp-parse.c | 46 | buf.data
otp-parse.c | 39 | otp-parse.c | 46 | buf.priv
otp-parse.c | 39 | otp-parse.c | 46 | buf.used

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

otp_read_words (80 to 147 otp-parse.c) - FAIL

#### Standards Violation Summary

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

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 146 | Pointer not checked for null before use : hash | CERT EXP08-C,EXP34-C
| 143 |  |
M | 84 | Procedure contains UR data flow anomalies. : bits | CERT EXP33-C
| 95 |  |
M | 86 | Procedure contains UR data flow anomalies. : buf.data | CERT EXP33-C
| 95 |  |
M | 86 | Procedure contains UR data flow anomalies. : buf.priv | CERT EXP33-C
| 95 |  |
M | 86 | Procedure contains UR data flow anomalies. : buf.used | CERT EXP33-C
| 95 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
otp-parse.c | 84 | otp-parse.c | 95 | bits
otp-parse.c | 86 | otp-parse.c | 95 | buf.data
otp-parse.c | 86 | otp-parse.c | 95 | buf.priv
otp-parse.c | 86 | otp-parse.c | 95 | buf.used

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

otp_read_new_params (149 to 180 otp-parse.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 169 | Pointer not checked for null before use : s | CERT EXP08-C,EXP34-C
| 168 |  |
M | 169 | Pointer not checked for null before use : end | CERT EXP08-C,EXP34-C
| 169 |  |
M | 168 | Pointer not checked for null before use : p | CERT EXP08-C,EXP34-C
| 163 |  |
M | 175 | Pointer not checked for null before use : p | CERT EXP08-C,EXP34-C
| 172 |  |
M | 159 | Pointer not checked for null before use : p | CERT EXP08-C,EXP34-C
| 157 |  |
M | 163 | Pointer not checked for null before use : s | CERT EXP08-C,EXP34-C
| 157 |  |
M | 174 | Pointer not checked for null before use : end | CERT EXP08-C,EXP34-C
| 175 |  |

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

otp_parse_response (182 to 191 otp-parse.c) - FAIL

#### Standards Violation Summary

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

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 190 | Pointer not checked for null before use : end | CERT EXP08-C,EXP34-C
| 186 |  |
M | 184 | Procedure contains UR data flow anomalies. : end | CERT EXP33-C
| 185 |  |
C | 182 | Procedure not called in code analysed : otp_parse_response |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
otp-parse.c | 184 | otp-parse.c | 185 | end
otp-parse.c | 184 | otp-parse.c | 186 | end

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

otp_parse_init_response (193 to 235 otp-parse.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 : end | CERT EXP08-C,EXP34-C
| 204 |  |
M | 217 | Pointer not checked for null before use : end | CERT EXP08-C,EXP34-C
| 216 |  |
M | 229 | Pointer not checked for null before use : end | CERT EXP08-C,EXP34-C
| 223 |  |
M | 196 | Procedure contains UR data flow anomalies. : end | CERT EXP33-C
| 197 |  |
C | 193 | Procedure not called in code analysed : otp_parse_init_response |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
otp-parse.c | 196 | otp-parse.c | 197 | end
otp-parse.c | 196 | otp-parse.c | 198 | end

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

otp_parse_dbentry (237 to 250 otp-parse.c) - FAIL

#### Standards Violation Summary

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

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 249 | Pointer not checked for null before use : NULL | CERT EXP08-C,EXP34-C
M | 246 | Pointer not checked for null before use : end | CERT EXP08-C,EXP34-C
| 242 |  |
M | 239 | Procedure contains UR data flow anomalies. : end | CERT EXP33-C
| 246 |  |
C | 237 | Procedure not called in code analysed : otp_parse_dbentry |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
otp-parse.c | 239 | otp-parse.c | 246 | end

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

otp_print_dbentry (252 to 257 otp-parse.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
C | 252 | Procedure not called in code analysed : otp_print_dbentry |

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

### End of Code Review Report

###

### Copyright © 2010 Liverpool Data Research Associates