(/home/sate/Testcases/c/cve/wireshark-1.2.0/text2pcap.c) |
| |
| 872 | | | parse_token (token_t token, char *str) |
| 873 | | | { |
| 874 | | | unsigned long num; |
| 875 | | | |
| 876 | | | |
| 877 | | | |
| 878 | | | |
| 879 | | | |
| 880 | | | |
| 881 | | | |
| 882 | | | if (debug>=2) { |
Event 1:
Taking true branch. debug >= 2 evaluates to true.
hide
|
|
| 883 | | | |
| 884 | | | char *c; |
| 885 | | | if (str!=NULL) { while ((c = strchr(str, '\r')) != NULL) *c=' '; } |
Event 2:
Skipping " if". str != (void *)0 evaluates to false.
hide
Event 3:
Considering the case where str must have been equal to 0.
hide
|
|
| 886 | | | |
| 887 | | | fprintf(stderr, "(%s, %s \"%s\") -> (", |
| 888 | | | state_str[state], token_str[token], str ? str : ""); |
Event 4:
str evaluates to false.
hide
|
|
| 889 | | | } |
| 890 | | | |
| 891 | | | switch(state) { |
Event 5:
state evaluates to 0.
hide
|
|
| 892 | | | |
| 893 | | | |
| 894 | | | case INIT: |
| 895 | | | switch(token) { |
Event 6:
token evaluates to 4.
hide
|
|
| 896 | | | case T_TEXT: |
| 897 | [+] | | append_to_preamble(str); |
Event 7:
str is passed to append_to_preamble(). - Dereferenced later, causing the null pointer dereference.
hide
|
|
 |
| |