(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dtd_preparse.c) |
| |
| 816 | | | YY_DECL |
| 817 | | | { |
| 818 | | | register yy_state_type yy_current_state; |
| 819 | | | register char *yy_cp, *yy_bp; |
| 820 | | | register int yy_act; |
| 821 | | | |
| 822 | | | #line 122 "dtd_preparse.l" |
| 823 | | | |
| 824 | | | |
| 825 | | | |
| 826 | | | #line 827 "dtd_preparse.c" |
| 827 | | | |
| 828 | | | if ( !(yy_init) ) |
| 829 | | | { |
| 830 | | | (yy_init) = 1; |
| 831 | | | |
| 832 | | | #ifdef YY_USER_INIT |
| 833 | | | YY_USER_INIT; |
| 834 | | | #endif |
| 835 | | | |
| 836 | | | if ( ! (yy_start) ) |
| 837 | | | (yy_start) = 1; |
| 838 | | | |
| 839 | | | if ( ! Dtd_PreParse_in ) |
| 840 | | | Dtd_PreParse_in = stdin; |
| 841 | | | |
| 842 | | | if ( ! Dtd_PreParse_out ) |
| 843 | | | Dtd_PreParse_out = stdout; |
| 844 | | | |
| 845 | | | if ( ! YY_CURRENT_BUFFER ) {
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dtd_preparse.c |
| |
289 | #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ |
290 | ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ |
291 | : NULL) |
| |
|
| 846 | | | Dtd_PreParse_ensure_buffer_stack (); |
| 847 | | | YY_CURRENT_BUFFER_LVALUE =
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dtd_preparse.c |
| |
296 | #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
| |
|
| 848 | | | Dtd_PreParse__create_buffer(Dtd_PreParse_in,YY_BUF_SIZE ); |
| 849 | | | } |
| 850 | | | |
| 851 | | | Dtd_PreParse__load_buffer_state( ); |
| 852 | | | } |
| 853 | | | |
| 854 | | | while ( 1 ) |
| 855 | | | { |
| 856 | | | yy_cp = (yy_c_buf_p); |
| 857 | | | |
| 858 | | | |
| 859 | | | *yy_cp = (yy_hold_char); |
| 860 | | | |
| 861 | | | |
| 862 | | | |
| 863 | | | |
| 864 | | | yy_bp = yy_cp; |
| 865 | | | |
| 866 | | | yy_current_state = (yy_start); |
| 867 | | | yy_match: |
| 868 | | | do |
| 869 | | | { |
| 870 | | | register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; |
| 871 | | | if ( yy_accept[yy_current_state] ) |
| 872 | | | { |
| 873 | | | (yy_last_accepting_state) = yy_current_state; |
| 874 | | | (yy_last_accepting_cpos) = yy_cp; |
| 875 | | | } |
| 876 | | | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
| 877 | | | { |
| 878 | | | yy_current_state = (int) yy_def[yy_current_state]; |
| 879 | | | if ( yy_current_state >= 78 ) |
| 880 | | | yy_c = yy_meta[(unsigned int) yy_c]; |
| 881 | | | } |
| 882 | | | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
| 883 | | | ++yy_cp; |
| 884 | | | } |
| 885 | | | while ( yy_current_state != 77 ); |
| 886 | | | yy_cp = (yy_last_accepting_cpos); |
| 887 | | | yy_current_state = (yy_last_accepting_state); |
| 888 | | | |
| 889 | | | yy_find_action: |
| 890 | | | yy_act = yy_accept[yy_current_state]; |
| 891 | | | |
| 892 | | | YY_DO_BEFORE_ACTION;
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dtd_preparse.c |
| |
382 | #define YY_DO_BEFORE_ACTION \ |
383 | (yytext_ptr) = yy_bp; \ |
384 | Dtd_PreParse_leng = (size_t) (yy_cp - yy_bp); \ |
385 | (yy_hold_char) = *yy_cp; \ |
386 | *yy_cp = '\0'; \ |
387 | (yy_c_buf_p) = yy_cp; |
| |
|
| 893 | | | |
| 894 | | | do_action: |
| 895 | | | |
| 896 | | | switch ( yy_act ) |
| 897 | | | { |
| 898 | | | case 0: |
| 899 | | | |
| 900 | | | *yy_cp = (yy_hold_char); |
| 901 | | | yy_cp = (yy_last_accepting_cpos); |
| 902 | | | yy_current_state = (yy_last_accepting_state); |
| 903 | | | goto yy_find_action; |
| 904 | | | |
| 905 | | | case 1: |
| 906 | | | YY_RULE_SETUP |
| 907 | | | #line 125 "dtd_preparse.l" |
| 908 | | | if (current) g_string_append_printf(current,"%s\n%s\n",replace_entity(Dtd_PreParse_text),location()); |
| 909 | | | YY_BREAK |
| 910 | | | case 2: |
| 911 | | | YY_RULE_SETUP |
| 912 | | | #line 127 "dtd_preparse.l" |
| 913 | | | if (current) g_string_append(current," "); |
| 914 | | | YY_BREAK |
| 915 | | | case 3: |
| 916 | | | YY_RULE_SETUP |
| 917 | | | #line 129 "dtd_preparse.l" |
| 918 | | | { g_string_append(current,Dtd_PreParse_text); BEGIN XMLPI; } |
| 919 | | | YY_BREAK |
| 920 | | | case 4: |
| 921 | | | YY_RULE_SETUP |
| 922 | | | #line 130 "dtd_preparse.l" |
| 923 | | | { g_string_append(current,Dtd_PreParse_text); } |
| 924 | | | YY_BREAK |
| 925 | | | case 5: |
| 926 | | | |
| 927 | | | YY_RULE_SETUP |
| 928 | | | #line 131 "dtd_preparse.l" |
| 929 | | | { g_string_append(current,Dtd_PreParse_text); } |
| 930 | | | YY_BREAK |
| 931 | | | case 6: |
| 932 | | | YY_RULE_SETUP |
| 933 | | | #line 132 "dtd_preparse.l" |
| 934 | | | { g_string_append(current,Dtd_PreParse_text); BEGIN OUTSIDE; } |
| 935 | | | YY_BREAK |
| 936 | | | case 7: |
| 937 | | | YY_RULE_SETUP |
| 938 | | | #line 134 "dtd_preparse.l" |
| 939 | | | { current = NULL; BEGIN ; } |
| 940 | | | YY_BREAK |
| 941 | | | case 8: |
| 942 | | | |
| 943 | | | #line 136 "dtd_preparse.l" |
| 944 | | | case 9: |
| 945 | | | |
| 946 | | | YY_RULE_SETUP |
| 947 | | | #line 136 "dtd_preparse.l" |
| 948 | | | ; |
| 949 | | | YY_BREAK |
| 950 | | | case 10: |
| 951 | | | YY_RULE_SETUP |
| 952 | | | #line 137 "dtd_preparse.l" |
| 953 | | | { current = output; BEGIN OUTSIDE; } |
| 954 | | | YY_BREAK |
| 955 | | | case 11: |
| 956 | | | |
| 957 | | | YY_RULE_SETUP |
| 958 | | | #line 139 "dtd_preparse.l" |
| 959 | | | { |
| 960 | | | linenum++; |
| 961 | | | if (current) g_string_append_printf(current,"%s\n",location()); |
| 962 | | | } |
| 963 | | | YY_BREAK |
| 964 | | | case 12: |
| 965 | | | |
| 966 | | | YY_RULE_SETUP |
| 967 | | | #line 145 "dtd_preparse.l" |
| 968 | | | { BEGIN IN_ENTITY; } |
| 969 | | | YY_BREAK |
| 970 | | | case 13: |
| 971 | | | YY_RULE_SETUP |
| 972 | | | #line 146 "dtd_preparse.l" |
| 973 | | | { entity_name = g_strdup_printf("%%%s;",Dtd_PreParse_text); BEGIN NAMED_ENTITY; } |
| 974 | | | YY_BREAK |
| 975 | | | case 14: |
| 976 | | | YY_RULE_SETUP |
| 977 | | | #line 147 "dtd_preparse.l" |
| 978 | | | { current = g_string_new(location()); BEGIN IN_QUOTE; } |
| 979 | | | YY_BREAK |
| 980 | | | case 15: |
| 981 | | | YY_RULE_SETUP |
| 982 | | | #line 148 "dtd_preparse.l" |
| 983 | | | { g_hash_table_insert(entities,entity_name,current); BEGIN ENTITY_DONE; } |
| 984 | | | YY_BREAK |
| 985 | | | case 16: |
| 986 | | | #line 150 "dtd_preparse.l" |
| 987 | | | case 17: |
| 988 | | | |
| 989 | | | #line 151 "dtd_preparse.l" |
| 990 | | | case 18: |
| 991 | | | |
| 992 | | | YY_RULE_SETUP |
| 993 | | | #line 151 "dtd_preparse.l" |
| 994 | | | g_string_append(current,Dtd_PreParse_text); |
| 995 | | | YY_BREAK |
| 996 | | | case 19: |
| 997 | | | YY_RULE_SETUP |
| 998 | | | #line 152 "dtd_preparse.l" |
| 999 | | | { |
| 1000 | | | g_string_append_printf(error,"at %s:%u: file inclusion is not supported!", filename, linenum); |
| 1001 | | | yyterminate(); |
| 1002 | | | } |
| 1003 | | | YY_BREAK |
Unreachable Control Flow
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 1004 | | | case 20: |
| 1005 | | | YY_RULE_SETUP |
| 1006 | | | #line 156 "dtd_preparse.l" |
| 1007 | | | { current = output; g_string_append(current,"\n"); BEGIN OUTSIDE; } |
| 1008 | | | YY_BREAK |
| 1009 | | | case 21: |
| 1010 | | | YY_RULE_SETUP |
| 1011 | | | #line 158 "dtd_preparse.l" |
| 1012 | | | ECHO; |
| 1013 | | | YY_BREAK |
| 1014 | | | #line 1015 "dtd_preparse.c" |
| 1015 | | | case YY_STATE_EOF(INITIAL): |
| 1016 | | | case YY_STATE_EOF(OUTSIDE): |
| 1017 | | | case YY_STATE_EOF(): |
| 1018 | | | case YY_STATE_EOF(IN_ENTITY): |
| 1019 | | | case YY_STATE_EOF(NAMED_ENTITY): |
| 1020 | | | case YY_STATE_EOF(IN_QUOTE): |
| 1021 | | | case YY_STATE_EOF(ENTITY_DONE): |
| 1022 | | | case YY_STATE_EOF(XMLPI): |
| 1023 | | | yyterminate(); |
| 1024 | | | |
| 1025 | | | case YY_END_OF_BUFFER: |
| 1026 | | | { |
| 1027 | | | |
| 1028 | | | int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; |
| 1029 | | | |
| 1030 | | | |
| 1031 | | | *yy_cp = (yy_hold_char); |
| 1032 | | | YY_RESTORE_YY_MORE_OFFSET |
| 1033 | | | |
| 1034 | | | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dtd_preparse.c |
| |
296 | #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
| |
|
| 1035 | | | { |
| 1036 | | | |
| 1037 | | | |
| 1038 | | | |
| 1039 | | | |
| 1040 | | | |
| 1041 | | | |
| 1042 | | | |
| 1043 | | | |
| 1044 | | | |
| 1045 | | | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dtd_preparse.c |
| |
296 | #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
| |
|
| 1046 | | | YY_CURRENT_BUFFER_LVALUE->yy_input_file = Dtd_PreParse_in;
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dtd_preparse.c |
| |
296 | #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
| |
|
| 1047 | | | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dtd_preparse.c |
| |
296 | #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
| |
|
| 1048 | | | } |
| 1049 | | | |
| 1050 | | | |
| 1051 | | | |
| 1052 | | | |
| 1053 | | | |
| 1054 | | | |
| 1055 | | | |
| 1056 | | | |
| 1057 | | | if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dtd_preparse.c |
| |
296 | #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
| |
|
| 1058 | | | { |
| 1059 | | | yy_state_type yy_next_state; |
| 1060 | | | |
| 1061 | | | (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; |
| 1062 | | | |
| 1063 | | | yy_current_state = yy_get_previous_state( ); |
| 1064 | | | |
| 1065 | | | |
| 1066 | | | |
| 1067 | | | |
| 1068 | | | |
| 1069 | | | |
| 1070 | | | |
| 1071 | | | |
| 1072 | | | |
| 1073 | | | |
| 1074 | | | yy_next_state = yy_try_NUL_trans( yy_current_state ); |
| 1075 | | | |
| 1076 | | | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
| 1077 | | | |
| 1078 | | | if ( yy_next_state ) |
| 1079 | | | { |
| 1080 | | | |
| 1081 | | | yy_cp = ++(yy_c_buf_p); |
| 1082 | | | yy_current_state = yy_next_state; |
| 1083 | | | goto yy_match; |
| 1084 | | | } |
| 1085 | | | |
| 1086 | | | else |
| 1087 | | | { |
| 1088 | | | yy_cp = (yy_last_accepting_cpos); |
| 1089 | | | yy_current_state = (yy_last_accepting_state); |
| 1090 | | | goto yy_find_action; |
| 1091 | | | } |
| 1092 | | | } |
| 1093 | | | |
| 1094 | | | else switch ( yy_get_next_buffer( ) ) |
| 1095 | | | { |
| 1096 | | | case EOB_ACT_END_OF_FILE: |
| 1097 | | | { |
| 1098 | | | (yy_did_buffer_switch_on_eof) = 0; |
| 1099 | | | |
| 1100 | | | if ( Dtd_PreParse_wrap( ) ) |
| 1101 | | | { |
| 1102 | | | |
| 1103 | | | |
| 1104 | | | |
| 1105 | | | |
| 1106 | | | |
| 1107 | | | |
| 1108 | | | |
| 1109 | | | |
| 1110 | | | |
| 1111 | | | (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; |
| 1112 | | | |
| 1113 | | | yy_act = YY_STATE_EOF(YY_START); |
| 1114 | | | goto do_action; |
| 1115 | | | } |
| 1116 | | | |
| 1117 | | | else |
| 1118 | | | { |
| 1119 | | | if ( ! (yy_did_buffer_switch_on_eof) ) |
| 1120 | | | YY_NEW_FILE; |
| 1121 | | | } |
| 1122 | | | break; |
| 1123 | | | } |
| 1124 | | | |
| 1125 | | | case EOB_ACT_CONTINUE_SCAN: |
| 1126 | | | (yy_c_buf_p) = |
| 1127 | | | (yytext_ptr) + yy_amount_of_matched_text; |
| 1128 | | | |
| 1129 | | | yy_current_state = yy_get_previous_state( ); |
| 1130 | | | |
| 1131 | | | yy_cp = (yy_c_buf_p); |
| 1132 | | | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
| 1133 | | | goto yy_match; |
| 1134 | | | |
| 1135 | | | case EOB_ACT_LAST_MATCH: |
| 1136 | | | (yy_c_buf_p) = |
| 1137 | | | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dtd_preparse.c |
| |
296 | #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
| |
|
| 1138 | | | |
| 1139 | | | yy_current_state = yy_get_previous_state( ); |
| 1140 | | | |
| 1141 | | | yy_cp = (yy_c_buf_p); |
| 1142 | | | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
| 1143 | | | goto yy_find_action; |
| 1144 | | | } |
| 1145 | | | break; |
| 1146 | | | } |
| 1147 | | | |
| 1148 | | | default: |
| 1149 | | | YY_FATAL_ERROR( |
| 1150 | | | "fatal flex scanner internal error--no action found" ); |
| 1151 | | | } |
| 1152 | | | } |
| 1153 | | | } |
| |