(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-snmp.c) |
| |
| 1189 | | | static snmp_ue_assoc_t* get_user_assoc(tvbuff_t* engine_tvb, tvbuff_t* user_tvb) { |
| 1190 | | | static snmp_ue_assoc_t* a; |
| 1191 | | | guint given_username_len; |
| 1192 | | | guint8* given_username; |
| 1193 | | | guint given_engine_len; |
| 1194 | | | guint8* given_engine; |
| 1195 | | | |
| 1196 | | | if ( ! (localized_ues || unlocalized_ues ) ) return NULL; |
Event 1:
Skipping " if". localized_ues evaluates to true.
hide
|
|
| 1197 | | | |
| 1198 | | | if (! ( user_tvb && engine_tvb ) ) return NULL; |
Event 2:
Skipping " if". - user_tvb evaluates to true.
- engine_tvb evaluates to true.
hide
|
|
| 1199 | | | |
| 1200 | [+] | | given_username_len = tvb_length_remaining(user_tvb,0); |
 |
| 1201 | | | given_username = ep_tvb_memdup(user_tvb,0,-1); |
| 1202 | [+] | | given_engine_len = tvb_length_remaining(engine_tvb,0); |
 |
| 1203 | | | given_engine = ep_tvb_memdup(engine_tvb,0,-1); |
| 1204 | | | |
| 1205 | | | for (a = localized_ues; a; a = a->next) { |
| 1206 | | | if ( localized_match(a, given_username, given_username_len, given_engine, given_engine_len) ) {
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-snmp.c |
| |
1180 | #define localized_match(a,u,ul,e,el) \ |
1181 | ( a->user.userName.len == ul \ |
1182 | && a->engine.len == el \ |
1183 | && memcmp( a->user.userName.data, u, (a->user.userName.len < ul) ? a->user.userName.len : ul ) == 0 \ |
1184 | && memcmp( a->engine.data, e, (a->engine.len < el) ? a->engine.len : el ) == 0 ) |
| |
|
| 1207 | | | return a; |
| 1208 | | | } |
| 1209 | | | } |
| 1210 | | | |
| 1211 | | | for (a = unlocalized_ues; a; a = a->next) { |
Event 20:
Entering loop body. a evaluates to true.
hide
|
|
| 1212 | | | if ( unlocalized_match(a, given_username, given_username_len) ) {
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-snmp.c |
| |
1186 | #define unlocalized_match(a,u,l) \ |
1187 | ( a->user.userName.len == l && memcmp( a->user.userName.data, u, a->user.userName.len < l ? a->user.userName.len : l) == 0 ) |
| |
|
| 1213 | [+] | | snmp_ue_assoc_t* n = localize_ue( a, given_engine, given_engine_len ); |
Event 22:
given_engine_len, which evaluates to -1, is passed to localize_ue() as the third argument. See related event 18.
hide
|
|
 |
| |