(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-xml.c) |
| |
| 1194 | | | static void init_xml_names(void) { |
| 1195 | | | xml_ns_t* xmlpi_xml_ns; |
| 1196 | | | guint i; |
| 1197 | | | DIRECTORY_T* dir; |
| 1198 | | | const FILE_T* file; |
| 1199 | | | const gchar* filename; |
| 1200 | | | gchar* dirname; |
| 1201 | | | |
| 1202 | | | GError** dummy = g_malloc(sizeof(GError *)); |
| 1203 | | | *dummy = NULL; |
| 1204 | | | |
| 1205 | | | xmpli_names = g_hash_table_new(g_str_hash,g_str_equal); |
| 1206 | | | media_types = g_hash_table_new(g_str_hash,g_str_equal); |
| 1207 | | | |
| 1208 | | | unknown_ns.elements = xml_ns.elements = g_hash_table_new(g_str_hash,g_str_equal); |
| 1209 | | | unknown_ns.attributes = xml_ns.attributes = g_hash_table_new(g_str_hash,g_str_equal); |
| 1210 | | | |
| 1211 | | | xmlpi_xml_ns = xml_new_namespace(xmpli_names,"xml","version","encoding","standalone",NULL); |
| 1212 | | | |
| 1213 | | | g_hash_table_destroy(xmlpi_xml_ns->elements); |
| 1214 | | | xmlpi_xml_ns->elements = NULL; |
| 1215 | | | |
| 1216 | | | |
| 1217 | | | dirname = get_persconffile_path("dtds", FALSE, FALSE); |
| 1218 | | | |
| 1219 | [+] | | if (test_for_directory(dirname) != EISDIR) {
x /usr/include/asm-generic/errno-base.h |
| |
24 | #define EISDIR 21 /* Is a directory */ |
| |
|
 |
| 1220 | | | |
| 1221 | | | g_free(dirname); |
| 1222 | | | dirname = get_datafile_path("dtds"); |
| 1223 | | | } |
| 1224 | | | |
| 1225 | [+] | | if (test_for_directory(dirname) == EISDIR) {
x /usr/include/asm-generic/errno-base.h |
| |
24 | #define EISDIR 21 /* Is a directory */ |
| |
|
 |
| 1226 | | | |
| 1227 | | | if ((dir = OPENDIR_OP(dirname)) != NULL) { |
Event 11:
g_dir_open is an Undefined Function.
hide
Event 12:
Taking true branch. (dir = g_dir_open(...)) != (void *)0 evaluates to true.
hide
|
|
| 1228 | | | while ((file = DIRGETNEXT_OP(dir)) != NULL) { |
Event 13:
g_dir_read_name is an Undefined Function.
hide
Event 14:
Entering loop body. (file = g_dir_read_name(...)) != (void *)0 evaluates to true.
hide
|
|
| 1229 | | | guint namelen; |
| 1230 | | | filename = GETFNAME_OP(file); |
| 1231 | | | |
| 1232 | | | namelen = (int)strlen(filename); |
| 1233 | | | if ( namelen > 4 && ( g_ascii_strcasecmp(filename+(namelen-4),".dtd") == 0 ) ) { |
| 1234 | | | GString* errors = g_string_new(""); |
| 1235 | [+] | | GString* preparsed = dtd_preparse(dirname, filename, errors); |
 |
| 1236 | | | dtd_build_data_t* dtd_data; |
| 1237 | | | |
| 1238 | | | if (errors->len) { |
Event 24:
Skipping " if". errors->len evaluates to false.
hide
|
|
| 1239 | | | report_failure("Dtd Preparser in file %s%c%s: %s",dirname,G_DIR_SEPARATOR,filename,errors->str); |
| 1240 | | | continue; |
| 1241 | | | } |
| 1242 | | | |
| 1243 | [+] | | dtd_data = dtd_parse(preparsed); |
Event 25:
preparsed, which evaluates to NULL, is passed to dtd_parse(). See related event 23.
hide
|
|
 |
| |