(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/oids.c) |
| |
| 79 | | | static oid_info_t* add_oid(const char* name, oid_kind_t kind, const oid_value_type_t* type, oid_key_t* key, guint oid_len, guint32 *subids) { |
| 80 | | | guint i = 0; |
| 81 | | | oid_info_t* c = &oid_root; |
| 82 | | | |
| 83 | | | if (!oid_root.children) { |
| 84 | | | char* debug_env = getenv("WIRESHARK_DEBUG_MIBS"); |
| 85 | | | guint32 subid; |
| 86 | | | |
| 87 | | | debuglevel = debug_env ? strtoul(debug_env,NULL,10) : 0; |
| 88 | | | |
| 89 | | | oid_root.children = pe_tree_create(EMEM_TREE_TYPE_RED_BLACK,"oid_root"); |
| 90 | | | |
| 91 | | | |
| 92 | | | |
| 93 | | | |
| 94 | | | |
| 95 | | | subid = 0; oid_add("itu-t",1,&subid); |
| 96 | | | subid = 1; oid_add("iso",1,&subid); |
| 97 | | | subid = 2; oid_add("joint-iso-itu-t",1,&subid); |
| 98 | | | } |
| 99 | | | |
| 100 | | | oid_len--; |
| 101 | | | |
| 102 | | | do { |
| 103 | | | oid_info_t* n = emem_tree_lookup32(c->children,subids[i]); |
| 104 | | | |
| 105 | | | if(n) { |
| 106 | | | if (i == oid_len) { |
| 107 | | | if (n->name) { |
| 108 | | | if (!g_str_equal(n->name,name)) { |
| 109 | | | D(2,("Renaming Oid from: %s -> %s, this means the same oid is registered more than once",n->name,name));
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/oids.c |
| |
49 | #define D(level,args) do if (debuglevel >= level) { printf args; printf("\n"); fflush(stdout); } while(0) |
| |
|
| 110 | | | } |
| 111 | | | |
| 112 | | | |
| 113 | | | } |
| 114 | | | |
| 115 | | | n->name = g_strdup(name); |
| 116 | | | |
| 117 | | | if (! n->value_type) { |
| 118 | | | n->value_type = type; |
| 119 | | | } |
| 120 | | | |
| 121 | | | return n; |
| 122 | | | } |
| 123 | | | } else { |
| 124 | | | n = g_malloc(sizeof(oid_info_t)); |
| 125 | | | n->subid = subids[i]; |
| 126 | | | n->kind = kind; |
| 127 | | | n->children = pe_tree_create(EMEM_TREE_TYPE_RED_BLACK,"oid_children"); |
| 128 | | | n->value_hfid = -2; |
| 129 | | | n->key = key; |
| 130 | | | n->parent = c; |
| 131 | | | n->bits = NULL; |
| 132 | | | |
| 133 | | | emem_tree_insert32(c->children,n->subid,n); |
| 134 | | | |
| 135 | | | if (i == oid_len) { |
| 136 | | | n->name = g_strdup(name); |
| 137 | | | n->value_type = type; |
| 138 | | | n->kind = kind; |
| 139 | | | return n; |
| 140 | | | } else { |
| 141 | | | n->name = NULL; |
| 142 | | | n->value_type = NULL; |
| 143 | | | n->kind = OID_KIND_UNKNOWN; |
| 144 | | | } |
| 145 | | | } |
| 146 | | | c = n; |
| 147 | | | } while(++i); |
| 148 | | | |
| 149 | | | g_assert_not_reached();
x /usr/include/glib-2.0/glib/gtestutils.h |
| |
73 | #define g_assert_not_reached() do { g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, NULL); } while (0) |
| |
x /usr/include/glib-2.0/glib/gmacros.h |
| |
160 | # define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__)) |
| |
|
| 150 | | | return NULL; |
Unreachable Computation
The highlighted code will not execute under any circumstances. This may be because of: |
|
| 151 | | | } |
| |