(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/tvbparse.c) |
| |
| 1239 | | | static void execute_callbacks(tvbparse_t* tt, tvbparse_elem_t* curr) { |
| 1240 | | | ep_stack_t stack = ep_stack_new(); |
| 1241 | | | |
| 1242 | | | while (curr) { |
Event 1:
Entering loop body. curr evaluates to true.
hide
|
|
| 1243 | | | if(curr->wanted->before) { |
Event 2:
Taking true branch. curr->wanted->before evaluates to true.
hide
|
|
| 1244 | | | #ifdef TVBPARSE_DEBUG |
| 1245 | | | if (TVBPARSE_DEBUG & TVBPARSE_DEBUG_CB) g_warning("execute_callbacks: BEFORE: id=%i offset=%i len=%i",curr->id,curr->offset,curr->len); |
| 1246 | | | #endif |
| 1247 | | | curr->wanted->before(tt->data, curr->wanted->data, curr); |
| 1248 | | | } |
| 1249 | | | |
| 1250 | | | if(curr->sub) { |
Event 3:
Taking false branch. curr->sub evaluates to false.
hide
|
|
| 1251 | | | ep_stack_push(stack,curr); |
| 1252 | | | curr = curr->sub; |
| 1253 | | | continue; |
| 1254 | | | } else { |
| 1255 | | | #ifdef TVBPARSE_DEBUG |
| 1256 | | | if (TVBPARSE_DEBUG & TVBPARSE_DEBUG_CB) g_warning("execute_callbacks: AFTER: id=%i offset=%i len=%i",curr->id,curr->offset,curr->len); |
| 1257 | | | #endif |
| 1258 | | | if(curr->wanted->after) curr->wanted->after(tt->data, curr->wanted->data, curr); |
Event 4:
Taking true branch. curr->wanted->after evaluates to true.
hide
|
|
| 1259 | | | } |
| 1260 | | | |
| 1261 | | | curr = curr->next; |
| 1262 | | | |
| 1263 | | | while( !curr && ep_stack_peek(stack) ) { |
| 1264 | [+] | | curr = ep_stack_pop(stack); |
 |
| 1265 | | | #ifdef TVBPARSE_DEBUG |
| 1266 | | | if (TVBPARSE_DEBUG & TVBPARSE_DEBUG_CB) g_warning("execute_callbacks: AFTER: id=%i offset=%i len=%i",curr->id,curr->offset,curr->len); |
| 1267 | | | #endif |
| 1268 | | | if( curr->wanted->after ) curr->wanted->after(tt->data, curr->wanted->data, curr); |
Null Pointer Dereference
curr is dereferenced here, but it is NULL. The issue can occur if the highlighted code executes. See related event 8. Show: All events | Only primary events |
|
| |