We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 879fcc4 commit c55523fCopy full SHA for c55523f
netloc/topology.c
@@ -175,8 +175,17 @@ netloc_topology_t *netloc_topology_construct(char *path)
175
char *remain_line = line;
176
177
field = line_get_next_field(&remain_line);
178
+ if (strlen(field) > 19)
179
+ field[19] = '\0';
180
HASH_FIND_STR(topology->nodes, field, node);
181
182
+ if (!node) {
183
+ fprintf(stderr, "Node node found: %s\n", field);
184
+ utarray_free(topology->partitions);
185
+ utarray_free(topology->topos);
186
+ return NULL;
187
+ }
188
+
189
while ((field = line_get_next_field(&remain_line))) {
190
/* There is an edge */
191
netloc_edge_t *edge = netloc_edge_construct();
0 commit comments