diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-01-25 14:23:46 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-01-25 14:23:46 +0000 |
commit | 2485b15112d08de613f373ce9ba3f451a53677b2 (patch) | |
tree | 912f3026cc5c26e1730495aed85f991a674187ac /src/ats/gnunet-service-ats_scheduling.c | |
parent | ad84b66c476308cfbd5eeaaa414d21c0d5e2de2c (diff) | |
download | gnunet-2485b15112d08de613f373ce9ba3f451a53677b2.tar.gz gnunet-2485b15112d08de613f373ce9ba3f451a53677b2.zip |
- clangs
Diffstat (limited to 'src/ats/gnunet-service-ats_scheduling.c')
-rw-r--r-- | src/ats/gnunet-service-ats_scheduling.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ats/gnunet-service-ats_scheduling.c b/src/ats/gnunet-service-ats_scheduling.c index 2d5a354e8..72b72cd3e 100644 --- a/src/ats/gnunet-service-ats_scheduling.c +++ b/src/ats/gnunet-service-ats_scheduling.c | |||
@@ -240,12 +240,13 @@ GAS_handle_address_update (void *cls, struct GNUNET_SERVER_Client *client, | |||
240 | plugin_name = &address[address_length]; | 240 | plugin_name = &address[address_length]; |
241 | else | 241 | else |
242 | plugin_name = ""; | 242 | plugin_name = ""; |
243 | |||
243 | if ((address_length + plugin_name_length + | 244 | if ((address_length + plugin_name_length + |
244 | ats_count * sizeof (struct GNUNET_ATS_Information) + | 245 | ats_count * sizeof (struct GNUNET_ATS_Information) + |
245 | sizeof (struct AddressUpdateMessage) != ntohs (message->size)) || | 246 | sizeof (struct AddressUpdateMessage) != ntohs (message->size)) || |
246 | (ats_count > | 247 | (ats_count > |
247 | GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_ATS_Information)) | 248 | GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_ATS_Information)) || |
248 | || (plugin_name[plugin_name_length - 1] != '\0')) | 249 | ((plugin_name_length > 0) && (plugin_name[plugin_name_length - 1] != '\0'))) |
249 | { | 250 | { |
250 | GNUNET_break (0); | 251 | GNUNET_break (0); |
251 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 252 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |