aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api_topology.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testbed/testbed_api_topology.c')
-rw-r--r--src/testbed/testbed_api_topology.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/testbed/testbed_api_topology.c b/src/testbed/testbed_api_topology.c
index a21a7cf53..7bc36d1b4 100644
--- a/src/testbed/testbed_api_topology.c
+++ b/src/testbed/testbed_api_topology.c
@@ -1147,9 +1147,11 @@ gen_topo_from_file (struct TopologyContext *tc,
1147 other_peer_id); 1147 other_peer_id);
1148 while (('\n' != data[offset]) && ('|' != data[offset]) && (offset < fs)) 1148 while (('\n' != data[offset]) && ('|' != data[offset]) && (offset < fs))
1149 offset++; 1149 offset++;
1150 if ('\n' == data[offset]) 1150 if ( (offset < fs) &&
1151 ('\n' == data[offset]) )
1151 state = PEER_INDEX; 1152 state = PEER_INDEX;
1152 else if ('|' == data[offset]) 1153 else if ( (offset < fs) &&
1154 ('|' == data[offset]) )
1153 { 1155 {
1154 state = OTHER_PEER_INDEX; 1156 state = OTHER_PEER_INDEX;
1155 offset++; 1157 offset++;
@@ -1491,7 +1493,7 @@ GNUNET_TESTBED_topology_get_ (enum GNUNET_TESTBED_TopologyOption *topology,
1491 { 1493 {
1492 if (NULL != topology) 1494 if (NULL != topology)
1493 *topology = (enum GNUNET_TESTBED_TopologyOption) cnt; 1495 *topology = (enum GNUNET_TESTBED_TopologyOption) cnt;
1494 GNUNET_assert (GNUNET_TESTBED_TOPOLOGY_OPTION_END != *topology); 1496 GNUNET_assert (GNUNET_TESTBED_TOPOLOGY_OPTION_END != (enum GNUNET_TESTBED_TopologyOption) cnt);
1495 return GNUNET_YES; 1497 return GNUNET_YES;
1496 } 1498 }
1497 } 1499 }