(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-smrse.c) |
| |
| 160 | | | dissect_smrse_T_octet_format(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { |
| 161 | | | #line 21 "smrse.cnf" |
| 162 | | | char *strp,tmpstr[21]; |
| 163 | | | guint32 i, start_offset; |
| 164 | | | gint8 class; |
| 165 | | | gboolean pc, ind; |
| 166 | | | gint32 tag; |
| 167 | | | guint32 len; |
| 168 | | | static char n2a[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; |
| 169 | | | |
| 170 | | | start_offset=offset; |
| 171 | | | |
| 172 | | | |
| 173 | | | offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag); |
| 174 | | | offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind); |
| 175 | | | if(len>10){ |
| 176 | | | len=10; |
| 177 | | | } |
| 178 | | | strp=tmpstr; |
| 179 | | | for(i=0;i<len;i++){ |
| 180 | | | *strp++=n2a[tvb_get_guint8(tvb, offset)&0x0f]; |
| 181 | | | *strp++=n2a[(tvb_get_guint8(tvb, offset)>>4)&0x0f]; |
| 182 | | | offset++; |
| 183 | | | } |
| 184 | | | *strp=0; |
| 185 | | | |
| 186 | | | proto_tree_add_string(tree, hf_smrse_Octet_Format, tvb, start_offset, offset-start_offset, tmpstr); |
| 187 | | | |
| 188 | | | return offset; |
| 189 | | | |
| 190 | | | |
| 191 | | | |
| 192 | | | return offset; |
Unreachable Data Flow
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 193 | | | } |
| |