(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-dcerpc-svcctl.c) |
| |
| 160 | | | svcctl_dissect_OpenSCManager_reply(tvbuff_t *tvb, int offset, |
| 161 | | | packet_info *pinfo, proto_tree *tree, |
| 162 | | | guint8 *drep) |
| 163 | | | { |
| 164 | | | dcerpc_info *di = (dcerpc_info *)pinfo->private_data; |
| 165 | | | dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data; |
| 166 | | | e_ctx_hnd policy_hnd; |
| 167 | | | proto_item *hnd_item; |
| 168 | | | guint32 status; |
| 169 | | | |
| 170 | | | |
| 171 | | | |
| 172 | | | offset = dissect_nt_policy_hnd( |
| 173 | | | tvb, offset, pinfo, tree, drep, hf_svcctl_hnd, &policy_hnd, |
| 174 | | | &hnd_item, TRUE, FALSE); |
| 175 | | | |
| 176 | | | offset = dissect_doserror( |
| 177 | | | tvb, offset, pinfo, tree, drep, hf_svcctl_rc, &status); |
| 178 | | | |
| 179 | | | if( status == 0 ){ |
| 180 | | | const char *pol_name; |
| 181 | | | |
| 182 | | | if (dcv->se_data){ |
| 183 | | | pol_name = ep_strdup_printf( |
| 184 | | | "OpenSCManagerW(%s)", (char *)dcv->se_data); |
Ignored Return Value
The return value of ep_strdup_printf() 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 ep_strdup_printf() is checked 97% 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 ep_strdup_printf() from the Ignored Return Value check, use configuration file parameter RETURN_CHECKER_IGNORED_FUNCS).
Show: All events | Only primary events |
|
| 185 | | | } else { |
| 186 | | | pol_name = "Unknown OpenSCManagerW() handle"; |
| 187 | | | } |
| 188 | | | if(!pinfo->fd->flags.visited){ |
Event 2:
Skipping " if". pinfo->fd->flags.visited evaluates to true.
hide
|
|
| 189 | | | dcerpc_store_polhnd_name(&policy_hnd, pinfo, pol_name); |
| 190 | | | } |
| 191 | | | |
| 192 | | | if(hnd_item) |
Event 3:
Skipping " if". hnd_item evaluates to false.
hide
|
|
| 193 | | | proto_item_append_text(hnd_item, ": %s", pol_name); |
| 194 | | | } |
| 195 | | | |
| 196 | | | return offset; |
| 197 | | | } |
| |