LDRA Testbed Code Review Report

LDRA Testbed ® Code Review Report

# System : Dovecot-src-lib-ntlm

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:34:20 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
--- | --- | --- | ---
37 | 77 S | Macro replacement list needs parentheses. | CERT PRE02-C
26 | 78 S | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
6 | 5 D | Procedure contains UR data flow anomalies. | CERT EXP33-C
10 | 45 D | Pointer not checked for null before use | CERT EXP08-C,EXP34-C
52 | 69 D | Procedure contains UR data flow anomalies. | CERT EXP33-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 34 program components, 20 (58.82 %) pass ( of which 0 conditionally pass ) and 14 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 |  | bitsel |  | ntlm-des.c |  | 0 |  | 0 |
Pass |  | des_key_setup |  | ntlm-des.c |  | 0 |  | 0 |
FAIL |  | des_encipher |  | ntlm-des.c |  | 9 | - |  | 2 | - |
Pass |  | des_cbc_encrypt |  | ntlm-des.c |  | 0 |  | 0 |
Pass |  | deshash |  | ntlm-des.c |  | 0 |  | 0 |
Pass |  | buffer_get_data |  | buffer.h analysed in ntlm-encrypt.c |  | 0 |  | 0 |
Pass |  | buffer_get_used_size |  | buffer.h analysed in ntlm-encrypt.c |  | 0 |  | 0 |
Pass |  | hmac_md5_update |  | hmac-md5.h analysed in ntlm-encrypt.c |  | 0 |  | 0 |
Pass |  | read_le16 |  | ntlm-byteorder.h analysed in ntlm-encrypt.c |  | 0 |  | 0 |
Pass |  | read_le32 |  | ntlm-byteorder.h analysed in ntlm-encrypt.c |  | 0 |  | 0 |
Pass |  | read_le64 |  | ntlm-byteorder.h analysed in ntlm-encrypt.c |  | 0 |  | 0 |
Pass |  | write_le16 |  | ntlm-byteorder.h analysed in ntlm-encrypt.c |  | 0 |  | 0 |
Pass |  | write_le32 |  | ntlm-byteorder.h analysed in ntlm-encrypt.c |  | 0 |  | 0 |
Pass |  | write_le64 |  | ntlm-byteorder.h analysed in ntlm-encrypt.c |  | 0 |  | 0 |
Pass |  | ntlmssp_buffer_data_i |  | ntlm.h analysed in ntlm-encrypt.c |  | 0 |  | 0 |
Pass |  | ntlmssp_buffer_length_i |  | ntlm.h analysed in ntlm-encrypt.c |  | 0 |  | 0 |
FAIL |  | t_unicode_str |  | ntlm-encrypt.c |  | 5 | - |  | 12 | - |
Pass |  | lm_hash |  | ntlm-encrypt.c |  | 0 |  | 0 |
FAIL |  | ntlm_v1_hash |  | ntlm-encrypt.c |  | 5 | - |  | 13 | - |
FAIL |  | hmac_md5_ucs2le_string_ucase |  | ntlm-encrypt.c |  | 5 | - |  | 13 | - |
FAIL |  | ntlm_v2_hash |  | ntlm-encrypt.c |  | 9 | - |  | 106 |
Pass |  | ntlmssp_v1_response |  | ntlm-encrypt.c |  | 0 |  | 0 |
FAIL |  | ntlmssp2_response |  | ntlm-encrypt.c |  | 9 | - |  | 111 |
FAIL |  | ntlmssp_v2_response |  | ntlm-encrypt.c |  | 9 | - |  | 129 |
FAIL |  | ntlmssp_t_str_i |  | ntlm-message.c |  | 9 | - |  | 13 | - |
Pass |  | append_string |  | ntlm-message.c |  | 0 |  | 0 |
FAIL |  | ntlmssp_append_string |  | ntlm-message.c |  | 9 | - |  | 24 | - |
FAIL |  | ntlmssp_append_target_info |  | ntlm-message.c |  | 14 | - |  | 11 | - |
Pass |  | ntlmssp_flags |  | ntlm-message.c |  | 0 |  | 0 |
FAIL |  | ntlmssp_create_challenge |  | ntlm-message.c |  | 9 | - |  | 5 | - |
Pass |  | ntlmssp_check_buffer |  | ntlm-message.c |  | 0 |  | 0 |
FAIL |  | ntlmssp_check_request |  | ntlm-message.c |  | 5 | - |  | 2 | - |
FAIL |  | ntlmssp_check_response |  | ntlm-message.c |  | 5 | - |  | 2 | - |

#### 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-ntlm\ntlm-message.c | Fri Mar 26 07:16:36 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lib-ntlm\ntlm-encrypt.c | Fri Mar 26 07:16:36 2010
C:\Code\SAMATE\SATE2010\dovecot-2.0.beta6.20100626\dovecot-2.0.beta6\src\lib-ntlm\ntlm-des.c | Fri Mar 26 07:16:36 2010

#### Global Basic Information

Number of procedures: | 33
Number of locally uncalled procedures: | 0
Maximum loop depth: | 1
Total Cyclomatic Complexity: | 43
Number of reformatted executable lines: | 962
Number of lines of comments: | 2280

## 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 | ntlm-des.c: 287 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | ntlm-des.c: 288 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C

Code | File: Src Line | Violation | Standard
--- | --- | --- | ---
M | ntlm-des.c: 492 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | ntlm-des.c: 508 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | ntlm-des.c: 511 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | ntlm-des.c: 519 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | ntlm-des.c: 573 | Macro replacement list needs parentheses. | CERT PRE02-C
M | ntlm-byteorder.h: 77 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | ntlm-byteorder.h: 77 | Macro replacement list needs parentheses. | CERT PRE02-C
M | ntlm.h: 12 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | ntlm.h: 12 | Macro replacement list needs parentheses. | CERT PRE02-C
M | ntlm.h: 21 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | ntlm.h: 21 | Macro replacement list needs parentheses. | CERT PRE02-C
M | ntlm.h: 30 | Macro parameter not in brackets. | CERT PRE01-C,PRE02-C
M | ntlm.h: 30 | Macro replacement list needs parentheses. | CERT PRE02-C

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

des_encipher (526 to 565 ntlm-des.c) - FAIL

#### Standards Violation Summary

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

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 530 | Procedure contains UR data flow anomalies. : s0246 | CERT EXP33-C
| 537 |  |
M | 530 | Procedure contains UR data flow anomalies. : s1357 | CERT EXP33-C
| 537 |  |
M | 530 | Procedure contains UR data flow anomalies. : swap | CERT EXP33-C
| 532 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
ntlm-des.c | 530 | ntlm-des.c | 537 | s0246
ntlm-des.c | 530 | ntlm-des.c | 537 | s1357
ntlm-des.c | 530 | ntlm-des.c | 532 | swap

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

t_unicode_str (20 to 33 ntlm-encrypt.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 25 | Pointer not checked for null before use : unsafe_data_stack_pool | CERT EXP08-C,EXP34-C
| Ref. Line -1038 (Module 498) |  |
M | 31 | Pointer not checked for null before use : wstr | CERT EXP08-C,EXP34-C
| 25 |  |
M | 27 | Pointer not checked for null before use : wstr | CERT EXP08-C,EXP34-C
| 25 |  |

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

ntlm_v1_hash (55 to 66 ntlm-encrypt.c) - FAIL

#### Standards Violation Summary

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

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

hmac_md5_ucs2le_string_ucase (68 to 75 ntlm-encrypt.c) - FAIL

#### Standards Violation Summary

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

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

ntlm_v2_hash (77 to 89 ntlm-encrypt.c) - FAIL

#### Standards Violation Summary

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

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 82 | Procedure contains UR data flow anomalies. : ctx.ctx.a | CERT EXP33-C
| 84 |  |
M | 82 | Procedure contains UR data flow anomalies. : ctx.ctx.b | CERT EXP33-C
| 84 |  |
M | 82 | Procedure contains UR data flow anomalies. : ctx.ctx.block | CERT EXP33-C
| 84 |  |
M | 82 | Procedure contains UR data flow anomalies. : ctx.ctx.buffer | CERT EXP33-C
| 84 |  |
M | 82 | Procedure contains UR data flow anomalies. : ctx.ctx.c | CERT EXP33-C
| 84 |  |
M | 82 | Procedure contains UR data flow anomalies. : ctx.ctx.d | CERT EXP33-C
| 84 |  |
M | 82 | Procedure contains UR data flow anomalies. : ctx.ctx.hi | CERT EXP33-C
| 84 |  |
M | 82 | Procedure contains UR data flow anomalies. : ctx.ctx.lo | CERT EXP33-C
| 84 |  |
M | 82 | Procedure contains UR data flow anomalies. : ctx.ctxo.a | CERT EXP33-C
| 84 |  |
M | 82 | Procedure contains UR data flow anomalies. : ctx.ctxo.b | CERT EXP33-C
| 84 |  |
M | 82 | Procedure contains UR data flow anomalies. : ctx.ctxo.block | CERT EXP33-C
| 84 |  |
M | 82 | Procedure contains UR data flow anomalies. : ctx.ctxo.buffer | CERT EXP33-C
| 84 |  |
M | 82 | Procedure contains UR data flow anomalies. : ctx.ctxo.c | CERT EXP33-C
| 84 |  |
M | 82 | Procedure contains UR data flow anomalies. : ctx.ctxo.d | CERT EXP33-C
| 84 |  |
M | 82 | Procedure contains UR data flow anomalies. : ctx.ctxo.hi | CERT EXP33-C
| 84 |  |
M | 82 | Procedure contains UR data flow anomalies. : ctx.ctxo.lo | CERT EXP33-C
| 84 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
ntlm-encrypt.c | 82 | ntlm-encrypt.c | 84 | ctx.ctx.a
ntlm-encrypt.c | 82 | ntlm-encrypt.c | 84 | ctx.ctx.b
ntlm-encrypt.c | 82 | ntlm-encrypt.c | 84 | ctx.ctx.block
ntlm-encrypt.c | 82 | ntlm-encrypt.c | 84 | ctx.ctx.buffer
ntlm-encrypt.c | 82 | ntlm-encrypt.c | 84 | ctx.ctx.c
ntlm-encrypt.c | 82 | ntlm-encrypt.c | 84 | ctx.ctx.d
ntlm-encrypt.c | 82 | ntlm-encrypt.c | 84 | ctx.ctx.hi
ntlm-encrypt.c | 82 | ntlm-encrypt.c | 84 | ctx.ctx.lo
ntlm-encrypt.c | 82 | ntlm-encrypt.c | 84 | ctx.ctxo.a
ntlm-encrypt.c | 82 | ntlm-encrypt.c | 84 | ctx.ctxo.b
ntlm-encrypt.c | 82 | ntlm-encrypt.c | 84 | ctx.ctxo.block
ntlm-encrypt.c | 82 | ntlm-encrypt.c | 84 | ctx.ctxo.buffer
ntlm-encrypt.c | 82 | ntlm-encrypt.c | 84 | ctx.ctxo.c
ntlm-encrypt.c | 82 | ntlm-encrypt.c | 84 | ctx.ctxo.d
ntlm-encrypt.c | 82 | ntlm-encrypt.c | 84 | ctx.ctxo.hi
ntlm-encrypt.c | 82 | ntlm-encrypt.c | 84 | ctx.ctxo.lo

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

ntlmssp2_response (109 to 124 ntlm-encrypt.c) - FAIL

#### Standards Violation Summary

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

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 115 | Procedure contains UR data flow anomalies. : ctx.a | CERT EXP33-C
| 118 |  |
M | 115 | Procedure contains UR data flow anomalies. : ctx.b | CERT EXP33-C
| 118 |  |
M | 115 | Procedure contains UR data flow anomalies. : ctx.block | CERT EXP33-C
| 118 |  |
M | 115 | Procedure contains UR data flow anomalies. : ctx.buffer | CERT EXP33-C
| 118 |  |
M | 115 | Procedure contains UR data flow anomalies. : ctx.c | CERT EXP33-C
| 118 |  |
M | 115 | Procedure contains UR data flow anomalies. : ctx.d | CERT EXP33-C
| 118 |  |
M | 115 | Procedure contains UR data flow anomalies. : ctx.hi | CERT EXP33-C
| 118 |  |
M | 115 | Procedure contains UR data flow anomalies. : ctx.lo | CERT EXP33-C
| 118 |  |
M | 116 | Procedure contains UR data flow anomalies. : session_hash | CERT EXP33-C
| 121 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
ntlm-encrypt.c | 115 | ntlm-encrypt.c | 118 | ctx.a
ntlm-encrypt.c | 115 | ntlm-encrypt.c | 118 | ctx.b
ntlm-encrypt.c | 115 | ntlm-encrypt.c | 118 | ctx.block
ntlm-encrypt.c | 115 | ntlm-encrypt.c | 118 | ctx.buffer
ntlm-encrypt.c | 115 | ntlm-encrypt.c | 118 | ctx.c
ntlm-encrypt.c | 115 | ntlm-encrypt.c | 118 | ctx.d
ntlm-encrypt.c | 115 | ntlm-encrypt.c | 118 | ctx.hi
ntlm-encrypt.c | 115 | ntlm-encrypt.c | 118 | ctx.lo
ntlm-encrypt.c | 116 | ntlm-encrypt.c | 121 | session_hash

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

ntlmssp_v2_response (126 to 144 ntlm-encrypt.c) - FAIL

#### Standards Violation Summary

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

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 133 | Procedure contains UR data flow anomalies. : ctx.ctx.a | CERT EXP33-C
| 138 |  |
M | 133 | Procedure contains UR data flow anomalies. : ctx.ctx.b | CERT EXP33-C
| 138 |  |
M | 133 | Procedure contains UR data flow anomalies. : ctx.ctx.block | CERT EXP33-C
| 138 |  |
M | 133 | Procedure contains UR data flow anomalies. : ctx.ctx.buffer | CERT EXP33-C
| 138 |  |
M | 133 | Procedure contains UR data flow anomalies. : ctx.ctx.c | CERT EXP33-C
| 138 |  |
M | 133 | Procedure contains UR data flow anomalies. : ctx.ctx.d | CERT EXP33-C
| 138 |  |
M | 133 | Procedure contains UR data flow anomalies. : ctx.ctx.hi | CERT EXP33-C
| 138 |  |
M | 133 | Procedure contains UR data flow anomalies. : ctx.ctx.lo | CERT EXP33-C
| 138 |  |
M | 133 | Procedure contains UR data flow anomalies. : ctx.ctxo.a | CERT EXP33-C
| 138 |  |
M | 133 | Procedure contains UR data flow anomalies. : ctx.ctxo.b | CERT EXP33-C
| 138 |  |
M | 133 | Procedure contains UR data flow anomalies. : ctx.ctxo.block | CERT EXP33-C
| 138 |  |
M | 133 | Procedure contains UR data flow anomalies. : ctx.ctxo.buffer | CERT EXP33-C
| 138 |  |
M | 133 | Procedure contains UR data flow anomalies. : ctx.ctxo.c | CERT EXP33-C
| 138 |  |
M | 133 | Procedure contains UR data flow anomalies. : ctx.ctxo.d | CERT EXP33-C
| 138 |  |
M | 133 | Procedure contains UR data flow anomalies. : ctx.ctxo.hi | CERT EXP33-C
| 138 |  |
M | 133 | Procedure contains UR data flow anomalies. : ctx.ctxo.lo | CERT EXP33-C
| 138 |  |
M | 134 | Procedure contains UR data flow anomalies. : hash | CERT EXP33-C
| 136 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
ntlm-encrypt.c | 133 | ntlm-encrypt.c | 138 | ctx.ctx.a
ntlm-encrypt.c | 133 | ntlm-encrypt.c | 138 | ctx.ctx.b
ntlm-encrypt.c | 133 | ntlm-encrypt.c | 138 | ctx.ctx.block
ntlm-encrypt.c | 133 | ntlm-encrypt.c | 138 | ctx.ctx.buffer
ntlm-encrypt.c | 133 | ntlm-encrypt.c | 138 | ctx.ctx.c
ntlm-encrypt.c | 133 | ntlm-encrypt.c | 138 | ctx.ctx.d
ntlm-encrypt.c | 133 | ntlm-encrypt.c | 138 | ctx.ctx.hi
ntlm-encrypt.c | 133 | ntlm-encrypt.c | 138 | ctx.ctx.lo
ntlm-encrypt.c | 133 | ntlm-encrypt.c | 138 | ctx.ctxo.a
ntlm-encrypt.c | 133 | ntlm-encrypt.c | 138 | ctx.ctxo.b
ntlm-encrypt.c | 133 | ntlm-encrypt.c | 138 | ctx.ctxo.block
ntlm-encrypt.c | 133 | ntlm-encrypt.c | 138 | ctx.ctxo.buffer
ntlm-encrypt.c | 133 | ntlm-encrypt.c | 138 | ctx.ctxo.c
ntlm-encrypt.c | 133 | ntlm-encrypt.c | 138 | ctx.ctxo.d
ntlm-encrypt.c | 133 | ntlm-encrypt.c | 138 | ctx.ctxo.hi
ntlm-encrypt.c | 133 | ntlm-encrypt.c | 138 | ctx.ctxo.lo
ntlm-encrypt.c | 134 | ntlm-encrypt.c | 136 | hash

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

ntlmssp_t_str_i (21 to 39 ntlm-message.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 34 | Pointer not checked for null before use : p | CERT EXP08-C,EXP34-C
| 25 |  |
M | 38 | Pointer not checked for null before use : str | CERT EXP08-C,EXP34-C
| 31 |  |
M | 34 | Pointer not checked for null before use : str | CERT EXP08-C,EXP34-C
| 31 |  |
C | 21 | Procedure not called in code analysed : ntlmssp_t_str_i |

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

ntlmssp_append_string (58 to 71 ntlm-message.c) - FAIL

#### Standards Violation Summary

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

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 61 | Procedure contains UR data flow anomalies. : buffer.length | CERT EXP33-C
| 70 |  |
M | 61 | Procedure contains UR data flow anomalies. : buffer.offset | CERT EXP33-C
| 70 |  |
M | 61 | Procedure contains UR data flow anomalies. : buffer.space | CERT EXP33-C
| 70 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
ntlm-message.c | 61 | ntlm-message.c | 70 | buffer.length
ntlm-message.c | 61 | ntlm-message.c | 70 | buffer.offset
ntlm-message.c | 61 | ntlm-message.c | 70 | buffer.space

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

ntlmssp_append_target_info (73 to 122 ntlm-message.c) - FAIL

#### Standards Violation Summary

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

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 103 | Pointer not checked for null before use : data | CERT EXP08-C,EXP34-C
| 101 |  |
M | 76 | Procedure contains UR data flow anomalies. : buffer.length | CERT EXP33-C
| 121 |  |
M | 76 | Procedure contains UR data flow anomalies. : buffer.offset | CERT EXP33-C
| 121 |  |
M | 76 | Procedure contains UR data flow anomalies. : buffer.space | CERT EXP33-C
| 121 |  |
M | 78 | Procedure contains UR data flow anomalies. : length | CERT EXP33-C
| 113 |  |

#### Possible UR Anomalies

The following variables may be referenced before being given a value

File | Undefine | File | Reference | Variable
--- | --- | --- | --- | ---
ntlm-message.c | 76 | ntlm-message.c | 121 | buffer.length
ntlm-message.c | 76 | ntlm-message.c | 121 | buffer.offset
ntlm-message.c | 76 | ntlm-message.c | 121 | buffer.space
ntlm-message.c | 78 | ntlm-message.c | 113 | length

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

ntlmssp_create_challenge (143 to 174 ntlm-message.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
M | 160 | Pointer not checked for null before use : buf | CERT EXP08-C,EXP34-C
| 152 |  |
C | 143 | Procedure not called in code analysed : ntlmssp_create_challenge |

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

ntlmssp_check_request (200 to 228 ntlm-message.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
C | 200 | Procedure not called in code analysed : ntlmssp_check_request |

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

ntlmssp_check_response (230 to 256 ntlm-message.c) - FAIL

#### Standards Violation Summary

Code | Line | Violation | Standard
--- | --- | --- | ---
C | 230 | Procedure not called in code analysed : ntlmssp_check_response |

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

### End of Code Review Report

###

### Copyright © 2010 Liverpool Data Research Associates