(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ldap.c) |
| |
| 1224 | | | dissect_ldap_AuthenticationChoice(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
| 1225 | | | #line 495 "ldap.cnf" |
| 1226 | | | gint branch = -1; |
| 1227 | | | gint auth = -1; |
| 1228 | | | const gchar *valstr; |
| 1229 | | | |
| 1230 | | | offset = dissect_ber_choice(actx, tree, tvb, offset, |
| 1231 | | | AuthenticationChoice_choice, hf_index, ett_ldap_AuthenticationChoice, |
| 1232 | | | &branch); |
| 1233 | | | |
| 1234 | | | |
| 1235 | | | ldap_do_protocolop(actx->pinfo); |
| 1236 | | | |
| 1237 | | | if((branch > -1) && (branch < (gint)(sizeof AuthenticationChoice_choice/sizeof AuthenticationChoice_choice[0]))) |
| 1238 | | | auth = AuthenticationChoice_choice[branch].value; |
| 1239 | | | |
| 1240 | | | valstr = val_to_str(auth, ldap_AuthenticationChoice_vals, "Unknown auth(%u)"); |
Ignored Return Value
The return value of val_to_str() is never checked in the highlighted execution scenario. - If the return value can indicate an error, the error will be ignored if the highlighted code executes.
- The return value of val_to_str() is checked 98% of the time in this project. CodeSonar is configured to enforce Ignored Return Value checks for any function whose return value is checked at least 96% of the time, unless the function is used fewer than 20 times. (To modify these thresholds, use configuration file parameters RETURN_CHECKER_SAMPLE_SIZE and RETURN_CHECKER_RATIO. To exempt val_to_str() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 1241 | | | |
| 1242 | | | |
| 1243 | | | if (check_col(actx->pinfo->cinfo, COL_INFO) && (auth != 10) && (auth != 11)) |
Event 2:
Skipping " if". - check_col(...) evaluates to true.
- auth != 10 evaluates to true.
- auth != 11 evaluates to false.
hide
|
|
| 1244 | | | col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", valstr); |
| 1245 | | | |
| 1246 | | | if(ldm_tree) |
Event 3:
Skipping " if". ldm_tree evaluates to false.
hide
|
|
| 1247 | | | proto_item_append_text(ldm_tree, " %s", valstr); |
| 1248 | | | |
| 1249 | | | |
| 1250 | | | |
| 1251 | | | |
| 1252 | | | return offset; |
| 1253 | | | } |
| |